[PATCH] libbb: Only setgid/setuid when necessary
Steven McDonald
steven at steven-mcdonald.id.au
Mon Jul 10 18:14:19 UTC 2017
On Mon, 10 Jul 2017 09:17:09 +0200
Denys Vlasenko <vda.linux at googlemail.com> wrote:
> * Don't check for errors: in normal use, they are impossible
I don't think this is correct. From setuid(2):
> EAGAIN
> The uid does not match the current uid and uid brings process over
> its RLIMIT_NPROC resource limit.
This would enable a trivial privilege elevation to root attack on a
system with setuid busybox. All the user needs to do is fork a lot of
processes up to RLIMIT_NPROC, and then have one of them exec busybox's
ash.
More information about the busybox
mailing list