# CVE-2026-90179: apparmor: fix deadlock in complain-mode change\_hat

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.21% (percentile 7, 2026-11-26)
- **Published:** 2026-09-17T16:07:04.413Z
- **Modified:** 2026-10-30T13:20:45.377Z

## Who should check

- Anyone running Linux \>= 9735e300a1c9259bfe4dc5ecdba472bb25574e8a, \< fb8ac089815dc192d891294cf0ffeeafd910136a; \>= 5acb878db41328dae4d3249bc87b9ee4f290a663, \< 5f1fedccf3f7add5e2a1205ac4938fa3893c5874; \>= 6446dbe02f4a3592bf062b4d12105927993086af, \< 91fce09d89b2d397996226216820f0e8b8149e22; \>= b427061ca498309bf581bb6f8df4ffcfe4c772cd, \< 00cce5e457cb690a3b3b3d334e76e71049ec8ae5; \>= 32e92764d6f8d251c1bca62be33793287b453a81, \< 072fb5aeec2eac7d445bf28c7119a1d6f6a2e333; \>= 32e92764d6f8d251c1bca62be33793287b453a81, \< 4ec11f14d1d6fdda787d991b142537be7841d395; 862ae1fcc78aea9acab2ac87cccf6431f4682b8e; 65f95c1e7ce70bf339504e22473879e02026cfc4; 67ee65ec1a3eebdde76ccaa664d20dcf5b125a2f; \>= 6.1.178, \< 6.1.191; …
- Anyone running Linux 7.2

## Description

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

apparmor: fix deadlock in complain-mode change\_hat

The use of change\_hat when in complain mode can cause a deadlock
when the hat doesn't exist and a new learning profile is created
for the missing profile. This is because change\_hat() has taken
the lock to search the hat list and creating the new learning
profile needs to take the lock to add it to the list.

From the bug report:

Originally found in 7.0.0 in LTS ubuntu 26.04 with pam\_apparmor + su
in complain mode set to change hats.  Then verified in newest
available vanilla kernel I've compiled to see if still present:

7.2-rc7 vanilla -\> affected

checked also some other kernels:
6.18.44 vanilla -\> affected
6.12.95 with debian patches -\> unaffected

On systems without bug (for example 6.12.95 debian) it just prints:

aa\_change\_hat rc=0

On systems with bug, the executable always hangs, prints nothing and
becomes unkillable.  (And once stuck this way, it will cause any
further hat changes to also cause the changing process to get stuck)

Then in syslog you can find hint about cause:

kernel: INFO: task hat:3409 blocked for more than 483 seconds.
kernel:       Not tainted 7.2.0-rc7 \#1
kernel: "echo 0 \> /proc/sys/kernel/hung\_task\_timeout\_secs" disables this message.
kernel: task:hat             state:D stack:0     pid:3409  tgid:3409  ppid:2605   task\_flags:0x400000 flags:0x00080800
kernel: Call Trace:
kernel:  \<TASK\>
kernel:  \_\_schedule+0x48f/0xfe0
kernel:  schedule+0x27/0xa0
kernel:  schedule\_preempt\_disabled+0x15/0x30
kernel:  \_\_mutex\_lock.constprop.0+0x569/0xa10
kernel:  aa\_new\_learning\_profile+0x15f/0x210
kernel:  build\_change\_hat+0x19f/0x3b0
kernel:  change\_hat.isra.0+0x5dd/0xd60
kernel:  aa\_change\_hat+0x2f3/0x710
kernel:  aa\_setprocattr\_changehat+0x121/0x1f0
kernel:  do\_setattr+0x28c/0x340
kernel:  apparmor\_setselfattr+0x20/0x50
kernel:  security\_setselfattr+0xf6/0x110
kernel:  \_\_x64\_sys\_lsm\_set\_self\_attr+0x53/0x90
kernel:  do\_syscall\_64+0xdd/0x5e0
kernel:  ? \_\_mod\_memcg\_lruvec\_state+0xfd/0x260
kernel:  ? lruvec\_stat\_mod\_folio+0x8d/0xd0
kernel:  ? \_\_folio\_mod\_stat+0x2d/0x90
kernel:  ? map\_anon\_folio\_pte\_nopf+0xd1/0x1f0
kernel:  ? do\_anonymous\_page+0x184/0xa10
kernel:  ? \_\_handle\_mm\_fault+0x805/0x870
kernel:  ? count\_memcg\_events+0xef/0x230
kernel:  ? handle\_mm\_fault+0x1f0/0x2f0
kernel:  ? do\_user\_addr\_fault+0x2bb/0x7b0
kernel:  ? do\_syscall\_64+0x94/0x5e0
kernel:  ? exc\_page\_fault+0x75/0x160
kernel:  entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
kernel: RIP: 0033:0x7f815e134c8d
kernel: RSP: 002b:00007fff6df94ea8 EFLAGS: 00000246 ORIG\_RAX: 00000000000001cc
kernel: RAX: ffffffffffffffda RBX: 0000556d8c81d040 RCX: 00007f815e134c8d
kernel: RDX: 0000000000000046 RSI: 0000556d8c81d040 RDI: 0000000000000064
kernel: RBP: 00007fff6df94ef0 R08: 00007f815e212ac8 R09: 000000000000000c
kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000556d8c81d010
kernel: R13: 0000000000000026 R14: 0000000000000046 R15: 0000000000000064
kernel:  \</TASK\>
kernel: INFO: task hat:3409 is blocked on a mutex likely owned by task hat:3409.

To fix the issue, lift the locking out of the core of
aa\_new\_learning\_profile(), introduce a wrapper function that takes the
lock where needed, and have build\_change\_hat() call the core function
that no longer takes the lock.

In addition fix 4 other issues introduced by commit
32e92764d6f8d ("apparmor: grab ns lock and refresh when looking up changehat child profiles")
- aa\_get\_profile\_rcu() was replaced-by: aa\_get\_profile without the
  accompanying rcu\_dereference\_protected()
- an extra aa\_get\_label(label) was introduced at the start of
  change\_hat() without an accompanying aa\_put\_label() causing a
  reference count leak.
- a reference count leak was introduced in the label\_is\_stale(label)
  case, where the newest profile would be leaked instead of the
  label passed to the function.
- a potential UAF when the lookup walks up the tree with new\_ns != ns
  the new label refere
---truncated---

## Affected and fixed versions

- Linux: \>= 9735e300a1c9259bfe4dc5ecdba472bb25574e8a, \< fb8ac089815dc192d891294cf0ffeeafd910136a; \>= 5acb878db41328dae4d3249bc87b9ee4f290a663, \< 5f1fedccf3f7add5e2a1205ac4938fa3893c5874; \>= 6446dbe02f4a3592bf062b4d12105927993086af, \< 91fce09d89b2d397996226216820f0e8b8149e22; \>= b427061ca498309bf581bb6f8df4ffcfe4c772cd, \< 00cce5e457cb690a3b3b3d334e76e71049ec8ae5; \>= 32e92764d6f8d251c1bca62be33793287b453a81, \< 072fb5aeec2eac7d445bf28c7119a1d6f6a2e333; \>= 32e92764d6f8d251c1bca62be33793287b453a81, \< 4ec11f14d1d6fdda787d991b142537be7841d395; 862ae1fcc78aea9acab2ac87cccf6431f4682b8e; 65f95c1e7ce70bf339504e22473879e02026cfc4; 67ee65ec1a3eebdde76ccaa664d20dcf5b125a2f; \>= 6.1.178, \< 6.1.191; … (cvelist)
- Linux: 7.2 (cvelist)

## 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-90179. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-90179.md
Affected: Linux >= 9735e300a1c9259bfe4dc5ecdba472bb25574e8a, < fb8ac089815dc192d891294cf0ffeeafd910136a; >= 5acb878db41328dae4d3249bc87b9ee4f290a663, < 5f1fedccf3f7add5e2a1205ac4938fa3893c5874; >= 6446dbe02f4a3592bf062b4d12105927993086af, < 91fce09d89b2d397996226216820f0e8b8149e22; >= b427061ca498309bf581bb6…
Fixed in: Linux 5f1fedccf3f7add5e2a1205ac4938fa3893c5874, Linux 91fce09d89b2d397996226216820f0e8b8149e22, Linux 00cce5e457cb690a3b3b3d334e76e71049ec8ae5, Linux 072fb5aeec2eac7d445bf28c7119a1d6f6a2e333, Linux 4ec11f14d1d6fdda787d991b142537be7841d395, Linux 6.1.191

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-90179 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 9735e300a1c9259bfe4dc5ecdba472bb25574e8a, \< fb8ac089815dc192d891294cf0ffeeafd910136a; \>= 5acb878db41328dae4d3249bc87b9ee4f290a663, \< 5f1fedccf3f7add5e2a1205ac4938fa3893c5874; \>= 6446dbe02f4a3592bf062b4d12105927993086af, \< 91fce09d89b2d397996226216820f0e8b8149e22; \>= b427061ca498309bf581bb6f8df4ffcfe4c772cd, \< 00cce5e457cb690a3b3b3d334e76e71049ec8ae5; \>= 32e92764d6f8d251c1bca62be33793287b453a81, \< 072fb5aeec2eac7d445bf28c7119a1d6f6a2e333; \>= 32e92764d6f8d251c1bca62be33793287b453a81, \< 4ec11f14d1d6fdda787d991b142537be7841d395; 862ae1fcc78aea9acab2ac87cccf6431f4682b8e; 65f95c1e7ce70bf339504e22473879e02026cfc4; 67ee65ec1a3eebdde76ccaa664d20dcf5b125a2f; \>= 6.1.178, \< 6.1.191; …; Linux 7.2.

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

Yes. Fixed in Linux 5f1fedccf3f7add5e2a1205ac4938fa3893c5874, Linux 91fce09d89b2d397996226216820f0e8b8149e22, Linux 00cce5e457cb690a3b3b3d334e76e71049ec8ae5, Linux 072fb5aeec2eac7d445bf28c7119a1d6f6a2e333, Linux 4ec11f14d1d6fdda787d991b142537be7841d395, Linux 6.1.191. No fix listed yet: follow the vendor advisory.

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

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/fb8ac089815dc192d891294cf0ffeeafd910136a>
- other: <https://git.kernel.org/stable/c/5f1fedccf3f7add5e2a1205ac4938fa3893c5874>
- other: <https://git.kernel.org/stable/c/91fce09d89b2d397996226216820f0e8b8149e22>
- other: <https://git.kernel.org/stable/c/00cce5e457cb690a3b3b3d334e76e71049ec8ae5>
- other: <https://git.kernel.org/stable/c/072fb5aeec2eac7d445bf28c7119a1d6f6a2e333>
- other: <https://git.kernel.org/stable/c/4ec11f14d1d6fdda787d991b142537be7841d395>

## 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-90179>

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