mac80211: fix use-after-free in CCMP/GCMP RX
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e64ea0597050157f926ac2ba9b478a44ee5be945 · < 57de2dcb18742dc2860861c9f496da7d42b67da0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mac80211: fix use-after-free in CCMP/GCMP RX
When PN checking is done in mac80211, for fragmentation we need to copy the PN to the RX struct so we can later use it to do a comparison, since commit bf30ca922a0c ("mac80211: check defrag PN against current frame").
Unfortunately, in that commit I used the 'hdr' variable without it being necessarily valid, so use-after-free could occur if it was necessary to reallocate (parts of) the frame.
Fix this by reloading the variable after the code that results in the reallocations, if any.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=214401.
From the CVE record · Linux
A use-after-free can occur in Linux kernel mac80211 CCMP/GCMP receive handling when fragmentation triggers PN checking and part of a frame must be reallocated. The input does not specify what an attacker can do with the flaw or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels with mac80211 should check whether their kernel includes the fix; affected versions are not specified.