CVE-2021-47388 mac80211: fix use-after-free in CCMP/GCMP RX

High 8.8 Published Updated

A use-after-free vulnerability in the Linux kernel's mac80211 subsystem allows attackers to potentially execute code or cause a denial of service via crafted wireless frames.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47388?

CVE-2021-47388 is a high-severity use after free vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-416

Which versions are affected by CVE-2021-47388?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47388?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2021-47388 being exploited?

There is no known exploitation of CVE-2021-47388 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47388, GHSA-q44p-8h6w-57m6, UBUNTU-CVE-2021-47388.

Is CVE-2021-47388 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free