KernelScan.io

HIGH

apparmor Policy Race

CVE-2026-23411

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: apparmor: fix race between freeing data and fs accessing it AppArmor was putting the reference to i_private data on its end after removing the original entry from the file system. However the inode can aand does live beyond that point and it is possible that some of the fs call back functions will be invoked after the reference has been put, which results in a race between freeing the data and accessing it through the fs. While the rawdata/loaddata is the most likely candidate to fail the race, as it has the fewest references. If properly crafted it might be possible to trigger a race for the other types stored in i_private. Fix this by moving the put of i_private referenced data to the correct place which is during inode eviction.

02

Engine v0.2.0

Risk summary

A local attacker with access to AppArmor policy files could potentially trigger a use-after-free condition by timing filesystem operations during policy updates. This could lead to kernel crashes or potentially code execution with kernel privileges.

Affectedsecurity/apparmor/apparmorfs.c

Vulnerability analysis

Root Cause: AppArmor was releasing references to i_private data immediately after removing filesystem entries, but inodes can persist beyond that point. Filesystem callback functions could still be invoked after the reference was released, creating a race condition between data freeing and access.

Attack Surface: Local filesystem access to AppArmor policy files in apparmorfs. Requires ability to access /sys/kernel/security/apparmor/ or similar policy interface files. The race window exists during policy loading/unloading operations.

Fix Mechanism: The patch moves the reference release from the filesystem entry removal path to the inode eviction callback (aafs_evict). It introduces a common reference counting system with aa_common_ref structure and proper get/put functions. The fix ensures data remains valid as long as the inode exists.

03

BranchFixed inPatch commit
5.105.10.253a92c5e5086a8
5.155.15.203667df93769c0
6.16.1.1693ddb961d2929
6.126.12.77eecce0263999
6.186.18.1813bc2772414d
6.196.19.82a732ed26fbd
6.66.6.130ae10787d955f
mainline7.08e135b8aee5a