Re: [6.8-rc1 Regression] Unable to exec apparmor_parser from virt-aa-helper
From: Linus Torvalds
Date: Wed Jan 24 2024 - 11:46:32 EST
On Wed, 24 Jan 2024 at 08:35, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> Oh, yikes. This means the LSM lost the knowledge that this open is an
> _exec_, not a _read_.
>
> I will starting looking at this. John might be able to point me in the
> right direction more quickly, though.
One obvious change in -rc1 is that the exec open was moved much
earlier: commit 978ffcbf00d8 ("execve: open the executable file before
doing anything else").
If the code ends up deciding "is this an exec" based on some state
flag that hasn't been set, that would explain it.
Something like "current->in_execve", perhaps?
Linus