# CVE-2026-99505: apparmor: fix a use-after-free in aa\_lookupn\_ns()

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.22% (percentile 7, 2026-11-28)
- **Published:** 2026-11-19T14:43:55.775Z
- **Modified:** 2026-11-23T08:17:52.870Z

## Who should check

- Anyone running Linux \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 87124024b0a7c46e04f5588808fd2c0e95ce567a; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< df8685e4f9da816927395c456a62c1043ecdd99a; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 2588c5693f4535e856841976cb1e1532bae77109; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 174b4b90ec6731934cf84eb267a86ad7152267fa; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 8db1a8614b4f8f3da11c568e2b5af4fe56eef360; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< f292873ceb4bd3a1a0f75f884361cd556e457692
- Anyone running Linux 4.13

## Description

In the Linux kernel, the following vulnerability has been resolved:

apparmor: fix a use-after-free in aa\_lookupn\_ns()

aa\_lookupn\_ns() takes a reference on the namespace it finds with
aa\_get\_ns(), which is kref\_get() on the reference count that the
namespace is released through, without checking whether the namespace
is still in use.  A concurrent removal of a ":"-prefixed namespace
looks the same namespace up and only then takes the parent lock to
remove it, so the last reference can be dropped between the lookup and
the aa\_get\_ns() call: the reference count then reports the increment on
a zero count and the kernel classifies the following use of the object
as a use-after-free.  A user with CAP\_MAC\_ADMIN can trigger this by
writing a ":\<name\>" removal and a ":\<name\>/\<profile\>" removal to
/sys/kernel/security/apparmor/.remove concurrently.

refcount\_t: addition on 0; use-after-free.
WARNING: lib/refcount.c:25 at refcount\_warn\_saturate+0xc0/0xe0, CPU\#6
Call Trace:
 \<TASK\>
 aa\_lookupn\_ns+0xa9/0xc0
 aa\_remove\_profiles+0x4fb/0x730
 ? \_\_kvmalloc\_node\_noprof+0x219/0x5c0
 ? \_\_pfx\_aa\_remove\_profiles+0x10/0x10
 ? aa\_loaddata\_alloc+0x65/0x1f0
 ? \_copy\_from\_user+0x2d/0x80
 ? aa\_loaddata\_alloc+0x111/0x1f0
 profile\_remove+0x2ee/0x4a0
 vfs\_write+0x21e/0xcf0
 ? rcu\_core+0x29c/0x1740
 ? timerqueue\_linked\_add+0x1f4/0x3d0
 ? \_\_pfx\_vfs\_write+0x10/0x10
 ? mutex\_lock+0x81/0xe0
 ? \_\_pfx\_mutex\_lock+0x10/0x10
 ? \_\_pfx\_rcu\_core+0x10/0x10
 ? \_\_pfx\_hrtimer\_update\_next\_event+0x10/0x10
 ? mutex\_unlock+0x7b/0xd0
 ? fdget\_pos+0x24d/0x4b0
 ksys\_write+0xf7/0x1c0
 ? \_\_pfx\_ksys\_write+0x10/0x10
 ? restore\_fpregs\_from\_fpstate+0x37/0xc0
 do\_syscall\_64+0xf9/0x540
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
 \</TASK\>

Fix by rejecting a namespace whose reference count is zero.

## Affected and fixed versions

- Linux: \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 87124024b0a7c46e04f5588808fd2c0e95ce567a; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< df8685e4f9da816927395c456a62c1043ecdd99a; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 2588c5693f4535e856841976cb1e1532bae77109; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 174b4b90ec6731934cf84eb267a86ad7152267fa; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 8db1a8614b4f8f3da11c568e2b5af4fe56eef360; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< f292873ceb4bd3a1a0f75f884361cd556e457692 (cvelist)
- Linux: 4.13 (cvelist)

## Technologies

Linux kernel

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-99505. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-99505.md
Affected: Linux >= 3664268f19ea07bec55df92fe53ff9ed28968bcc, < 87124024b0a7c46e04f5588808fd2c0e95ce567a; >= 3664268f19ea07bec55df92fe53ff9ed28968bcc, < df8685e4f9da816927395c456a62c1043ecdd99a; >= 3664268f19ea07bec55df92fe53ff9ed28968bcc, < ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b; >= 3664268f19ea07bec55df92…
Fixed in: Linux 87124024b0a7c46e04f5588808fd2c0e95ce567a, Linux 1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3, Linux 2588c5693f4535e856841976cb1e1532bae77109, Linux 174b4b90ec6731934cf84eb267a86ad7152267fa, Linux 8db1a8614b4f8f3da11c568e2b5af4fe56eef360

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-99505 being exploited?

There is no confirmed exploitation: CVE-2026-99505 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-99505?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-99505?

Linux \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 87124024b0a7c46e04f5588808fd2c0e95ce567a; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< df8685e4f9da816927395c456a62c1043ecdd99a; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 2588c5693f4535e856841976cb1e1532bae77109; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 174b4b90ec6731934cf84eb267a86ad7152267fa; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< 8db1a8614b4f8f3da11c568e2b5af4fe56eef360; \>= 3664268f19ea07bec55df92fe53ff9ed28968bcc, \< f292873ceb4bd3a1a0f75f884361cd556e457692; Linux 4.13.

### Is there a fix for CVE-2026-99505?

Yes. Fixed in Linux 87124024b0a7c46e04f5588808fd2c0e95ce567a, Linux 1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3, Linux 2588c5693f4535e856841976cb1e1532bae77109, Linux 174b4b90ec6731934cf84eb267a86ad7152267fa, Linux 8db1a8614b4f8f3da11c568e2b5af4fe56eef360. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-99505?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/87124024b0a7c46e04f5588808fd2c0e95ce567a>
- other: <https://git.kernel.org/stable/c/df8685e4f9da816927395c456a62c1043ecdd99a>
- other: <https://git.kernel.org/stable/c/ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b>
- other: <https://git.kernel.org/stable/c/1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3>
- other: <https://git.kernel.org/stable/c/2588c5693f4535e856841976cb1e1532bae77109>
- other: <https://git.kernel.org/stable/c/174b4b90ec6731934cf84eb267a86ad7152267fa>
- other: <https://git.kernel.org/stable/c/8db1a8614b4f8f3da11c568e2b5af4fe56eef360>
- other: <https://git.kernel.org/stable/c/f292873ceb4bd3a1a0f75f884361cd556e457692>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-99505>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-99505> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-99505>
