Description of problem: mtr is not running because it is installed suid Version-Release number of selected component (if applicable): mtr-0.92-2.mga7 How reproducible: Always Steps to Reproduce: 1. Install mtr package 2. Run mtr with a user account: $ mtr 4.2.2.2 3. Error is displayed: mtr: mtr should not run suid 4. Verify permissions: $ ls -l /usr/sbin/mtr -rwsr-xr-x 1 root ntools 72552 Sep 28 2018 /sbin/mtr* Workaround: Per this macports bug, https://trac.macports.org/ticket/54977, only mtr-packet needs to be suid. Changing the permissions on /usr/sbin/mtr to 0755 fixes the problem. /usr/sbin/mtr-packet is set suid by the RPM already.
Created attachment 11117 [details] mtr_suid_fix.patch Updated SPEC file for mtr. Both /usr/bin/mtr and /usr/bin/xmtr exhibited the issue. The symlink permissions don't apply, but adjusted those as well.
Jani, I have assigned this (no maintainer) to you because it seems you dealt with it previously. Apologies if this is not appropriate; you will know where to pass it on.
CC: (none) => lewyssmithAssignee: bugsquad => jani.valimaa
Fixed in SVN for cauldron, but we need to wait until mga7 is branched and cauldron reopens. I dropped all setuid bits and used capabilities (cap_net_raw+ep) for mtr-packet instead.
Whiteboard: (none) => MGA7TOO
mtr-0.92-2.1.mga7 is landing to core/updates_testing for mga7. Please test.
Assignee: jani.valimaa => qa-bugsCC: (none) => jani.valimaa
CC: lewyssmith => (none)
MGA7-32 MATE on IBM Thinkpad R50e No installation issues. At CLI as normal user: $ mtr -h Usage: mtr [options] hostname So tried $ mtr <remote hostname> mtr: Failure to start mtr-packet: Invalid argument $ mtr <remoteIPadress> mtr: Failure to start mtr-packet: Invalid argument $ mtr <ownIPaddress> mtr: Failure to start mtr-packet: Invalid argument Not sure this is intended behavior. Leaving for others to judge.
CC: (none) => herman.viaene
mga7, x86_64 $ mtr --version mtr: mtr should not run suid $ rpm -qa | grep mtr mtr-0.92-2.mga7 $ ll /usr/sbin/mtr -rwsr-xr-x 1 root ntools 72552 Sep 28 2018 /usr/sbin/mtr* After update: $ mtr --version mtr 0.91.1-4c982 $ rpm -qa | grep mtr mtr-0.92-2.1.mga7 $ ll /usr/sbin/mtr -rwxr-xr-x 1 root ntools 72552 Jun 29 15:33 /usr/sbin/mtr* $ mtr google.com mtr: Failure to start mtr-packet: Invalid argument $ sudo mtr google.com My traceroute [v0.91.1-4c982] canopus (192.168.x.x) 2019-07-01T21:42:17+0100 Keys: Help Display mode Restart statistics Order of fields quit Packets Pings Host Loss% Snt Last Avg Best Wrst StDev 1. Arcturus 0.0% 10 0.3 0.3 0.3 0.3 0.0 2. 10.234.224.1 0.0% 10 8.1 9.8 7.1 14.7 2.2 3. sgyl-core-2a-xe-332-0.network.vi 0.0% 10 8.7 10.0 8.1 17.0 2.7 4. ??? 5. tele-ic-8-ae5-0.network.virginme 0.0% 10 18.0 18.6 17.6 19.2 0.6 6. 126-14-250-212.static.virginm.ne 0.0% 10 17.6 20.6 16.7 26.5 3.7 7. 74.125.242.65 0.0% 9 22.8 20.4 19.3 22.8 1.2 8. 172.253.68.217 0.0% 9 27.3 23.1 19.8 29.3 3.7 9 Looks OK.
CC: (none) => tarazed25
@Herman referring to comment 5: your test looks good. What you saw seems to be the intended behaviour.
Whiteboard: MGA7TOO => MGA7TOO MGA7-64-OK
CC: (none) => tmbWhiteboard: MGA7TOO MGA7-64-OK => MGA7-64-OKVersion: Cauldron => 7
I think we should have all binaries either in /usr/bin or /usr/sbin, but not in mixed locations. Makefile installs all binaries to /usr/sbin and we install a symlink for mtr to /usr/bin. Normally /usr/sbin isn't in $PATH and if mtr-packet isn't found from $PATH, the following is output (like we saw in comment 5): mtr: Failure to start mtr-packet: Invalid argument I would move all binaries to /usr/bin as I can't see why a normal user shouldn't have access to this tool.
(In reply to Jani Välimaa from comment #8) > > I would move all binaries to /usr/bin as I can't see why a normal user > shouldn't have access to this tool. Pushed mtr-0.92-2.2.mga7 to core/updates_testing. Please test.
Whiteboard: MGA7-64-OK => (none)
$ rpm -qa | grep mtr mtr-0.92-2.1.mga7 $ mtr --version mtr 0.91.1-4c982 $ mtr google.com mtr: Failure to start mtr-packet: Invalid argument $ sudo mtr google.com <Runs OK> Updated the package from mga7 updates testing. Ran the update using MageiaUpdate. ... installing mtr-0.92-2.2.mga7.x86_64 $ mtr --version mtr 0.91.1-4c982 $ mtr google.com My traceroute [v0.91.1-4c982] canopus (192.168.x.x) 2019-07-04T18:51:18+0100 Keys: Help Display mode Restart statistics Order of fields quit Packets Pings Host Loss% Snt Last Avg Best Wrst StDev 1. Arcturus 0.0% 8 0.3 0.3 0.3 0.4 0.0 [...] mtr can be run by an ordinary user.
Whiteboard: (none) => MGA7-64-OK
Advisory uploaded, validating.
Keywords: (none) => advisory, validated_updateCC: (none) => sysadmin-bugs
An update for this issue has been pushed to the Mageia Updates repository. https://advisories.mageia.org/MGAA-2019-0050.html
Resolution: (none) => FIXEDStatus: NEW => RESOLVED