Path: ...!3.eu.feeder.erje.net!feeder.erje.net!usenet.goja.nl.eu.org!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail From: Richard Kettlewell Newsgroups: comp.os.linux.misc Subject: Re: Yet Another New systemd Feature Date: Tue, 07 May 2024 16:29:30 +0100 Organization: terraraq NNTP server Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6"; logging-data="35102"; mail-complaints-to="usenet@innmantic.terraraq.uk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:irDmqd1Y6MJNCKGE//jfZDfdO84= X-Face: h[Hh-7npe<v9!1Z&W?r\c.!4DXH5PWpga"ha +r0NzP?vnz:e/knOY)PI- X-Boydie: NO Bytes: 2622 Lines: 28 Grant Taylor writes: > On 5/6/24 14:08, Andy Burns wrote: >> I've encountered plenty, not so well controlled, where all it takes >> is "sudo su -" > > That's why I would tend to allow non-SA teams to have sudo with a > specific command (possibly without needing to re-enter their password) > while only allowing the Unix SAs to have `sudo su` et al. access. I think this is optimistic at best. One reason is the difficulty of writing correct setuid programs. sudo’s CVE record shows how hard this is (as if there were any doubt by now). Some of the historical CVEs stem from it being written in C but for others the implementation language doesn’t seem to be very relevant. The other is that impracticality of ensuring the the commands you want to run don’t allow further escalation. Of course you may be auditing all the commands you permit in this way but realistically, most people doing this aren’t. Some of these issues translate to any other strategy for managing privilege escalation (there is no free lunch); others don’t. Certainly getting the escalated process out of the calling user’s environment, as run0 does, is a real improvement. Being able to remove setuid/setgid programs from Linux would be a big step forward in security terms. -- https://www.greenend.org.uk/rjk/