CVE-2023-52502 net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()

High 8.8 Published Updated

A race condition in the Linux kernel NFC subsystem allows attackers to trigger a use-after-free, potentially leading to code execution or system crashes.

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-2023-52502?

CVE-2023-52502 is a high-severity use after free vulnerability in Linux kernel, published on 2 Mar 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:

net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()

Sili Luo reported a race in nfc_llcp_sock_get(), leading to UAF.

Getting a reference on the socket found in a lookup while holding a lock should happen before releasing the lock.

nfc_llcp_sock_get_sn() has a similar problem.

Finally nfc_llcp_recv_snl() needs to make sure the socket found by nfc_llcp_sock_from_sn() does not disappear.

Weakness: CWE-416, CWE-362

Which versions are affected by CVE-2023-52502?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52502?

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-2023-52502 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52502, DEBIAN-CVE-2023-52502, GHSA-g754-37wh-7wv7, UBUNTU-CVE-2023-52502.

Is CVE-2023-52502 in your software?

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

Check your SBOMs for free