apparmor: fix differential encoding verification
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 · < 623a9d211bbbb031bb1cbdb38b23487648167f8a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
apparmor: fix differential encoding verification
Differential encoding allows loops to be created if it is abused. To prevent this the unpack should verify that a diff-encode chain terminates.
Unfortunately the differential encode verification had two bugs.
1. it conflated states that had gone through check and already been marked, with states that were currently being checked and marked. This means that loops in the current chain being verified are treated as a chain that has already been verified.
2. the order bailout on already checked states compared current chain check iterators j,k instead of using the outer loop iterator i. Meaning a step backwards in states in the current chain verification was being mistaken for moving to an already verified state.
Move to a double mark scheme where already verified states get a different mark, than the current chain being kept. This enables us to also drop the backwards verification check that was the cause of the second error as any already verified state is already marked.
From the CVE record · Linux
The Linux kernel’s AppArmor unpacker does not correctly verify that differential-encoding chains terminate. A crafted chain can create a loop. The input does not specify the access or user-interaction conditions needed to trigger it.
Engineers running Linux kernels with AppArmor should check their versions; affected versions are not specified.