apparmor: fix deadlock in complain-mode change_hat
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 32e92764d6f8d251c1bca62be33793287b453a81 · < 4ec11f14d1d6fdda787d991b142537be7841d395| No fix yet |
| Linux Linux |
|
|
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:
From the CVE record · Linux
AppArmor's change_hat can deadlock when a process in complain mode requests a nonexistent hat and a new learning profile is created. The calling process becomes unkillable, and subsequent hat changes can also hang. The report describes a local process triggering the issue; it does not specify authentication requirements.
Engineers running Linux kernels with AppArmor should check their builds; 7.0.0 on Ubuntu 26.04, vanilla 7.2-rc7, and vanilla 6.18.44 were reported affected, while Debian-patched 6.12.95 was unaffected.