UBUNTU: SAUCE: AppArmor: Fix Oops when in apparmor_bprm_set_creds
Looks right. Either profiles is NULL or the flags are checked.
John Johansen wrote:
> BugLink: http://bugs.launchpad.net/bugs/437258
> SRU Justification: This can cause an oops at 000068. This will happen to
> all processes confined or unconfined when name resolution fails at exec.
> This can happen in a couple different cases, applications like psxe, and mugen
> munge the process during their decrompress and set up links so that a valid
> name does not exist. The other way that this can happen is executing code
> from a path that has been lazily unmounted. This can occur with nfs and
> automounters, or any mount point that gets unmounted with lazy unmount allowed.
> If name resolution fails due on exec and a profile is not defined
> then AppArmor will cause an oops due to a broken conditional leading to
> dereferencing a profile pointer that is null.
> Signed-off-by: John Johansen <firstname.lastname@example.org>
Acked-by: Stefan Bader <email@example.com>