# CVE-2026-99847: apparmor: don't revalidate inherited files under files->file_lock

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-30T13:17:36.624Z
- Modified: 2026-11-30T14:20:18.030Z
- Assigned by: Linux

## Description

In 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.

(As written by CVE List.)

## Affected

- Linux Linux: from d8ea44f6090c087fe255d9512fb808574b4d88e8 before a20f98ffe158ea5eeb9932a3badbce267cd04917; from b1aea2c1960771a276d7e68c7424168eccd0c3da before 43aba2eeaa34e045bdd73abfe66c8bd3fed97852; from b1aea2c1960771a276d7e68c7424168eccd0c3da before a913281f600157aa036b7c02afbb18a0ac115187; d680472db98823d90fc91362910901e468269318; from 6.18.40 before 6.18.63; from 7.1.5 before 7.2; 7.2 (not affected: before 7.2; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/a20f98ffe158ea5eeb9932a3badbce267cd04917>
- <https://git.kernel.org/stable/c/43aba2eeaa34e045bdd73abfe66c8bd3fed97852>
- <https://git.kernel.org/stable/c/a913281f600157aa036b7c02afbb18a0ac115187>

## Sources

- CVE List: [CVE-2026-99847](https://www.cve.org/CVERecord?id=CVE-2026-99847), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-99847](https://nvd.nist.gov/vuln/detail/CVE-2026-99847), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-99847 · Whole record: https://cve.day/CVE-2026-99847.json · Rebuilt by cve.day 2026-11-30T14:33:40.021Z
