Re: hardlinks to setuid binaries

George Georgalis <[email protected]> Wed, 30 Mar 2022 18:00:27 -0700
Newsgroups gmane.os.netbsd.devel.security
Message-ID <CAHK3FNwHNT619Nq3NCiktpU77=n6RC9Wq+hK6BU4AyJSdJQ7tQ@mail.gmail.com>
On Mon, Mar 28, 2022 at 1:35 PM David Holland
<[email protected]> wrote:
> Plenty of compat issues to figure out before trying to deploy either,
> though.
>
> (though I don't see where even the setuid flag interferes with
> updating base and in pkgsrc it'll only interfere with the small number
> of packages that build in destdir but not user-destdir mode)

For simplified storage management, I typically put home in a /usr
partition and symlink it from the root partition, and allocate typical
/tmp and /var partitions, separate from root. That obviously exposes
me to the potential of user hardlinked vulnerable suid binaries.

For all of the solutions discussed the consequences don't seem
to outway administratively separating user writable partitions, ie
(my) practice change but no implementation change.

However, an audit of package hardlink count, warning on check,
block on upgrade (without --force), to facilitate finding extra links,
seems like a low cost sanity check?

-George

-- 
George Georgalis, (415) 894-2710, http://www.galis.org/