{"id":"CVE-2026-99847","aliases":["CVE-2026-99847"],"related":[],"kind":"vulnerability","state":"published","title":"apparmor: don't revalidate inherited files under files->file_lock","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: don't revalidate inherited files under files->file_lock\n\naa_inherit_files() revalidates inherited files on exec using\niterate_fd(), which calls the callback with files->file_lock held,\nso the revalidation is done with IN_ATOMIC. However the unix socket\nmediation path can sleep: aa_unix_file_perm() drops a ref on the\npeer's path with path_put(), and unix_fs_perm() -> aa_path_perm()\nallocates a buffer with aa_get_buffer(false), resulting in\n\n  BUG: sleeping function called from invalid context at fs/dcache.c:1039\n  ...\n   dput.part.0+0x24/0x180\n   path_put+0x2c/0x60\n   aa_unix_file_perm+0x42a/0x17b0\n   aa_file_perm+0xcd3/0x1060\n   match_file+0x10b/0x190\n   iterate_fd+0xe6/0x280\n   aa_inherit_files+0x250/0x4f0\n\nOnly grab a ref on each file under iterate_fd(), and revalidate it\nafter the lock is dropped, so revalidation is done with no locks held\nand does not need to be atomic. Denied fds are still replaced with\n/dev/null, or closed if it can not be opened.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: don't revalidate inherited files under files->file_lock\n\naa_inherit_files() revalidates inherited files on exec using\niterate_fd(), which calls the callback with files->file_lock held,\nso the revalidation is done with IN_ATOMIC. However the unix socket\nmediation path can sleep: aa_unix_file_perm() drops a ref on the\npeer's path with path_put(), and unix_fs_perm() -> aa_path_perm()\nallocates a buffer with aa_get_buffer(false), resulting in\n\n  BUG: sleeping function called from invalid context at fs/dcache.c:1039\n  ...\n   dput.part.0+0x24/0x180\n   path_put+0x2c/0x60\n   aa_unix_file_perm+0x42a/0x17b0\n   aa_file_perm+0xcd3/0x1060\n   match_file+0x10b/0x190\n   iterate_fd+0xe6/0x280\n   aa_inherit_files+0x250/0x4f0\n\nOnly grab a ref on each file under iterate_fd(), and revalidate it\nafter the lock is dropped, so revalidation is done with no locks held\nand does not need to be atomic. Denied fds are still replaced with\n/dev/null, or closed if it can not be opened.","source":"cvelist"}],"published":"2026-11-30T13:17:36.624Z","modified":"2026-11-30T14:20:18.030Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"d8ea44f6090c087fe255d9512fb808574b4d88e8","fixed":"a20f98ffe158ea5eeb9932a3badbce267cd04917","status":"affected"},{"type":"git","introduced":"b1aea2c1960771a276d7e68c7424168eccd0c3da","fixed":"43aba2eeaa34e045bdd73abfe66c8bd3fed97852","status":"affected"},{"type":"git","introduced":"b1aea2c1960771a276d7e68c7424168eccd0c3da","fixed":"a913281f600157aa036b7c02afbb18a0ac115187","status":"affected"},{"type":"git","version":"d680472db98823d90fc91362910901e468269318","status":"affected"},{"type":"semver","introduced":"6.18.40","fixed":"6.18.63","status":"affected"},{"type":"semver","introduced":"7.1.5","fixed":"7.2","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.2","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/a20f98ffe158ea5eeb9932a3badbce267cd04917","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/43aba2eeaa34e045bdd73abfe66c8bd3fed97852","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a913281f600157aa036b7c02afbb18a0ac115187","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99847","url":"https://www.cve.org/CVERecord?id=CVE-2026-99847","licence":"CVE Terms of Use","modified":"2026-11-30T13:17:36.624Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99847","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99847","licence":"Public domain","modified":"2026-11-30T14:20:18.030Z"}],"updatedAt":"2026-11-30T14:33:40.021Z","epss":{"score":0.00207,"percentile":0.11436,"date":"2026-12-01T12:00:22.000Z"}}