apparmor: don't revalidate inherited files under files->file_lock

Summary

CVECVE-2026-99847
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:20:18 UTC
Updated2026-11-30 14:20:18 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: apparmor: don't revalidate inherited files under files->file_lock aa_inherit_files() revalidates inherited files on exec using iterate_fd(), which calls the callback with files->file_lock held, so the revalidation is done with IN_ATOMIC. However the unix socket mediation path can sleep: aa_unix_file_perm() drops a ref on the peer's path with path_put(), and unix_fs_perm() -> aa_path_perm() allocates a buffer with aa_get_buffer(false), resulting in BUG: sleeping function called from invalid context at fs/dcache.c:1039 ... dput.part.0+0x24/0x180 path_put+0x2c/0x60 aa_unix_file_perm+0x42a/0x17b0 aa_file_perm+0xcd3/0x1060 match_file+0x10b/0x190 iterate_fd+0xe6/0x280 aa_inherit_files+0x250/0x4f0 Only grab a ref on each file under iterate_fd(), and revalidate it after the lock is dropped, so revalidation is done with no locks held and does not need to be atomic. Denied fds are still replaced with /dev/null, or closed if it can not be opened.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected d8ea44f6090c087fe255d9512fb808574b4d88e8 a20f98ffe158ea5eeb9932a3badbce267cd04917 git Not specified
CNA Linux Linux affected b1aea2c1960771a276d7e68c7424168eccd0c3da 43aba2eeaa34e045bdd73abfe66c8bd3fed97852 git Not specified
CNA Linux Linux affected b1aea2c1960771a276d7e68c7424168eccd0c3da a913281f600157aa036b7c02afbb18a0ac115187 git Not specified
CNA Linux Linux affected d680472db98823d90fc91362910901e468269318 git Not specified
CNA Linux Linux affected 6.18.40 6.18.63 semver Not specified
CNA Linux Linux affected 7.1.5 7.2 semver Not specified
CNA Linux Linux affected 7.2 Not specified
CNA Linux Linux unaffected 7.2 semver Not specified
CNA Linux Linux unaffected 6.18.63 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.4 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/43aba2eeaa34e045bdd73abfe66c8bd3fed97852 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/a913281f600157aa036b7c02afbb18a0ac115187 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/a20f98ffe158ea5eeb9932a3badbce267cd04917 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report