CVE-2024-58007 soc: qcom: socinfo: Avoid out of bounds read of serial number

High 7.1 Published Updated

An out-of-bounds read in the Qualcomm socinfo driver allows attackers to read memory beyond the serial number field, potentially exposing sensitive kernel data.

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-58007?

CVE-2024-58007 is a high-severity vulnerability in Linux kernel, published on 27 Feb 2025. 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:

soc: qcom: socinfo: Avoid out of bounds read of serial number

On MSM8916 devices, the serial number exposed in sysfs is constant and does not change across individual devices. It's always:

db410c:/sys/devices/soc0$ cat serial_number 2644893864

The firmware used on MSM8916 exposes SOCINFO_VERSION(0, 8), which does not have support for the serial_num field in the socinfo struct. There is an existing check to avoid exposing the serial number in that case, but it's not correct: When checking the item_size returned by SMEM, we need to make sure the *end* of the serial_num is within bounds, instead of comparing with the *start* offset. The serial_number currently exposed on MSM8916 devices is just an out of bounds read of whatever comes after the socinfo struct in SMEM.

Fix this by changing offsetof() to offsetofend(), so that the size of the field is also taken into account.

Weakness: CWE-125

Which versions are affected by CVE-2024-58007?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-58007?

Apply the vendor's patch.

Is CVE-2024-58007 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-58007, DEBIAN-CVE-2024-58007, GHSA-f23q-rhxc-p26p, ROOT-OS-UBUNTU-2404-CVE-2024-58007, UBUNTU-CVE-2024-58007.

Is CVE-2024-58007 in your software?

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

Check your SBOMs for free