Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 1 Oct 2019 07:42:46 -0400
From: Rich Felker <>
To: Florian Weimer <>
Cc: Joshua Hudson <>,
Subject: Re: Re: posix_spawn

On Tue, Oct 01, 2019 at 09:05:18AM +0200, Florian Weimer wrote:
> * Rich Felker:
> > This is not safe and creates a false sense that something broken might
> > work. Moreover it's a vulnerability to use it this way. You have a
> > window where different tasks sharing VM space are executing with
> > different privilege levels, and thereby one is able to seize execution
> > of the other and achieve its privilege level.
> That's a non-sequitur.  A shared address space does not necessarily mean
> that execution under one set of credentials will have unrestricted
> effects on executions under different credentials within the same
> address space.

It does, but not necessarily in all circumstances. The case in which
is it dangerous is when one of the tasks is "dropping privileges"
before executing code that either intentionally (e.g. a login session,
script interpreter, etc. acting behalf of the new user) or
unintentionally (because the code after dropping privileges is not as
heavily scrutinized and has a vulnerability) lets the attacker execute
code they control. In that case, the now-attacker-controlled task can
perform operations on the VM space of the privileged task, e.g. using
mmap to replace the code it's executing with whatever it wants.

This issue is why it's so important that setuid, etc. not return
before all threads have been confirmed to have completed the operation
(just queuing or initiating it for them all is not enough).


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.