[apparmor] [PATCH 16/16] apparmor: clear the full task context when setting onexec.
john.johansen at canonical.com
Thu Apr 28 07:40:36 UTC 2016
On 04/27/2016 09:14 PM, Seth Arnold wrote:
> On Wed, Apr 20, 2016 at 11:52:58PM -0700, John Johansen wrote:
>> This prevents a bug where a hat could be used to set onexec and then
>> return to parent with it set.
>> If in a hat when onexec is set then return to parent will be prevented.
> This looks like a potentially surprising change. If an exec() fails, a
> program may reasonably try to aa_changehat() back to the parent afterward,
> and continue, no? This change will kill the process if it tries.
Indeed, missed this and it very well could be why we aren't doing it. So
what we really need is an orthogonal patch to this where, the onxec setting
is cleared if the exec fails.
Well and we need to document the reason we don't clear it the state here.
I withdraw the patch and will submit the alternative in its place
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the AppArmor