apparmor: validate DFA start states are in bounds in unpack_pdb
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ad5ff3db53c68c2f12936bc74ea5dfe0af943592 · < 0baadb0eece2c4d939db10d3c323b4652ac79a58| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
apparmor: validate DFA start states are in bounds in unpack_pdb
Start states are read from untrusted data and used as indexes into the DFA state tables. The aa_dfa_next() function call in unpack_pdb() will access dfa->tables[YYTD_ID_BASE][start], and if the start state exceeds the number of states in the DFA, this results in an out-of-bound read.
================================================================== BUG: KASAN: slab-out-of-bounds in aa_dfa_next+0x2a1/0x360 Read of size 4 at addr ffff88811956fb90 by task su/1097 ...
Reject policies with out-of-bounds start states during unpacking to prevent the issue.
From the CVE record · Linux
The Linux kernel’s AppArmor policy unpacking does not validate DFA start states before using them as table indexes. An attacker who supplies untrusted policy data with an out-of-bounds start state can trigger an out-of-bounds read when the policy is unpacked. The input does not specify whether this requires local access, authentication, or user interaction.
Anyone running a Linux kernel with AppArmor should check the vendor advisory for affected versions.