CVE-2026-99847: apparmor: don't revalidate inherited files under files->file_lock
apparmor: don't revalidate inherited files under files->filelock
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1
Event History
Frequently Asked Questions
Which systems are exposed to the invalid-context sleep?
Systems using AppArmor file revalidation during exec are affected when inherited file descriptors include paths that enter Unix socket mediation. The problematic path occurs while inherited descriptors are iterated with files->file_lock held.
How can I recognize that this issue has occurred?
The kernel can report "BUG: sleeping function called from invalid context" with a stack involving path_put, aa_unix_file_perm, aa_file_perm, match_file, iterate_fd, and aa_inherit_files.
What does the fix change for denied inherited file descriptors?
The fix takes a reference to each file while iterating descriptors, then revalidates it after files->file_lock is released. Descriptors that are denied continue to be replaced with /dev/null, or closed when /dev/null cannot be opened.