[PATCH] apparmor: don't take chroot root refs in d_namespace_path()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Dec 1 15:34:20 UTC 2026


> From: Arun Iyengar <aiyengar1990 at gmail.com>
> 
> The unix peer checks call aa_path_perm() under unix_state_lock().
> For a chroot_relative profile, d_namespace_path() then does
> get_fs_root() and path_put(), and dput() may sleep.
> 
> Snapshot the root under RCU and fs->seq, as d_path() does.
> __d_path() only compares against the root.
> 
> Fixes: c05e705812d1 ("apparmor: add fine grained af_unix mediation")
> Cc: stable at vger.kernel.org
> Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-apparmor-chroot-rel-v1-1-f075c3d7db40@gmail.com?part=1



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