CVE-2024-58007

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-58007
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-58007.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-58007
Downstream
Related
Published
2025-02-27T02:12:03.593Z
Modified
2025-11-28T02:34:57.636029Z
Summary
soc: qcom: socinfo: Avoid out of bounds read of serial number
Details

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 SOCINFOVERSION(0, 8), which does not have support for the serialnum 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 itemsize returned by SMEM, we need to make sure the *end* of the serialnum 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58007.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
efb448d0a3fca01bb987dd70963da6185b81751e
Fixed
7445fa05317534bbd8b373c0eff8319187916030
Fixed
2495c6598731b6d7f565140f2bd63ef4bc36ce7d
Fixed
2d09d3c9afa2fc422ac3df7c9b8534f350ee19dd
Fixed
9c88b3a3fae4d60641c3a45be66269d00eff33cd
Fixed
47470acd719d45c4c8c418c07962f74cc995652b
Fixed
407c928305c1a37232a63811c400ef616f85ccbc
Fixed
0a92feddae0634a0b87c04b19d343f6af97af700
Fixed
22cf4fae6660b6e1a583a41cbf84e3046ca9ccd0

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.4.0
Fixed
5.4.291
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.235
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.179
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.129
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.78
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.14
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.3