CVE-2024-56700 media: wl128x: Fix atomicity violation in fmc_send_cmd()

Medium 5.5 Published Updated

A race condition in the wl128x media driver can cause a null pointer dereference, leading to a system crash.

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

What is CVE-2024-56700?

CVE-2024-56700 is a medium-severity vulnerability in Linux kernel, published on 28 Dec 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:

media: wl128x: Fix atomicity violation in fmc_send_cmd()

Atomicity violation occurs when the fmc_send_cmd() function is executed simultaneously with the modification of the fmdev->resp_skb value. Consider a scenario where, after passing the validity check within the function, a non-null fmdev->resp_skb variable is assigned a null value. This results in an invalid fmdev->resp_skb variable passing the validity check. As seen in the later part of the function, skb = fmdev->resp_skb; when the invalid fmdev->resp_skb passes the check, a null pointer dereference error may occur at line 478, evt_hdr = (void *)skb->data;

To address this issue, it is recommended to include the validity check of fmdev->resp_skb within the locked section of the function. This modification ensures that the value of fmdev->resp_skb does not change during the validation process, thereby maintaining its validity.

This possible bug is found by an experimental static analysis tool developed by our team. This tool analyzes the locking APIs to extract function pairs that can be concurrently executed, and then analyzes the instructions in the paired functions to identify possible concurrency bugs including data races and atomicity violations.

Weakness: CWE-476

Which versions are affected by CVE-2024-56700?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-56700?

Apply the vendor's patch.

Is CVE-2024-56700 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-56700, DEBIAN-CVE-2024-56700, GHSA-2hfg-4m2j-678g, UBUNTU-CVE-2024-56700.

Is CVE-2024-56700 in your software?

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

Check your SBOMs for free