[PATCH] apparmor: fix race on NULL ctx->peer in update_sk_ctx()

Emanuele Rocca emanuele.rocca at arm.com
Sat Oct 31 10:11:43 UTC 2026


On 2026-10-29 02:26, sashiko-bot at kernel.org wrote:
> Does this depend on the prerequisite patch referenced in the Link tag
> (https://lore.kernel.org/all/20260824155822.9214-1-maxime.belair@canonical.com/)
> that adds the NULL checks on ctx->peer under the socket lock?

It does, and Maxime's patch has already been merged into the apparmor
tree, as well as mainline:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4de32fd05ce9e63b492899215ea929e7d306cdab

The patch I'm proposing is still needed to fix the earlier race at the
beginning of update_sk_ctx. 



More information about the Linux-security-module-archive mailing list