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.
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.
Published:
2026-11-30
Score:
n/a
EPSS:
n/a
KEV:
No
Analysis and contextual insights are available on OpenCVE Cloud.
Remediation
No vendor fix or workaround currently provided.
Additional remediation guidance may be available on OpenCVE Cloud.
Tracking
Sign in to view the affected projects.
Advisories
No advisories yet.
References
History
Mon, 30 Nov 2026 13:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | apparmor: don't revalidate inherited files under files->file_lock | |
| First Time appeared |
Linux
Linux linux Kernel |
|
| CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Linux
Linux linux Kernel |
|
| References |
|
Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2026-11-30T13:17:36.624Z
Reserved: 2026-09-25T10:25:14.437Z
Link: CVE-2026-99847
No data.
Status : Received
Published: 2026-11-30T14:20:18.030
Modified: 2026-11-30T14:20:18.030
Link: CVE-2026-99847
No data.
OpenCVE Enrichment
No data.
Weaknesses
No weakness.