Skip to main content

CVE-2024-58007: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-58007cvecve-2024-58007
Published: Thu Feb 27 2025 (02/27/2025, 02:12:03 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

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.

AI-Powered Analysis

AILast updated: 06/28/2025, 09:55:40 UTC

Technical Analysis

CVE-2024-58007 is a vulnerability identified in the Linux kernel specifically affecting Qualcomm MSM8916 devices. The issue arises from an out-of-bounds read in the socinfo driver component, which is responsible for exposing system-on-chip (SoC) information via sysfs. On affected MSM8916 devices, the serial number exposed in sysfs is constant and does not vary between devices, indicating that the data read is not the actual serial number but rather an out-of-bounds memory read beyond the socinfo struct in shared memory (SMEM). The root cause is an incorrect boundary check when reading the serial number field: the code compares the start offset of the serial_num field against the item size returned by SMEM, rather than ensuring the end of the serial_num field is within bounds. This leads to reading memory beyond the intended structure, potentially leaking adjacent memory content. The fix involves changing the boundary check from using offsetof() to offsetofend(), which accounts for the size of the serial_num field and ensures the entire field is within bounds before reading. This vulnerability does not appear to allow arbitrary code execution or privilege escalation directly but can lead to information disclosure through unintended memory reads. It affects Linux kernel versions containing the vulnerable socinfo driver implementation for MSM8916 devices. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the primary impact of CVE-2024-58007 is the potential leakage of sensitive information due to out-of-bounds reads in the kernel on affected Qualcomm MSM8916-based devices. While the exposed serial number is constant and not unique per device, the out-of-bounds read could reveal adjacent memory content, which might include sensitive kernel or system data. This could aid attackers in reconnaissance or further exploitation attempts. The vulnerability is limited to devices running Linux kernels with the vulnerable socinfo driver on MSM8916 hardware, which is typically found in certain embedded systems, IoT devices, or specialized industrial equipment. European enterprises using such devices in critical infrastructure, manufacturing, or telecommunications could face confidentiality risks. However, since exploitation does not require user interaction or elevated privileges beyond reading sysfs entries, the attack surface is somewhat limited. The absence of known exploits reduces immediate risk, but organizations should remain vigilant. The vulnerability does not directly impact system integrity or availability but could be a stepping stone for more complex attacks if combined with other vulnerabilities.

Mitigation Recommendations

European organizations should take the following specific mitigation steps: 1) Identify all devices running Linux kernels with Qualcomm MSM8916 SoC and the vulnerable socinfo driver, focusing on embedded and IoT devices within their infrastructure. 2) Apply the official Linux kernel patches that fix the boundary check by replacing offsetof() with offsetofend() in the socinfo driver code. If vendor-specific firmware or kernel updates are available for affected devices, prioritize deploying those updates. 3) Where patching is not immediately possible, restrict access to sysfs entries exposing socinfo data by implementing strict access controls or kernel-level security modules to prevent unauthorized reads. 4) Monitor device logs and network traffic for unusual access patterns or attempts to read sysfs entries related to socinfo. 5) Incorporate this vulnerability into risk assessments for embedded device management and consider network segmentation to isolate vulnerable devices from critical systems. 6) Engage with device vendors to confirm patch availability and timelines, especially for industrial or telecom equipment using MSM8916 hardware.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-27T02:10:48.227Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdecb6

Added to database: 5/21/2025, 9:08:51 AM

Last enriched: 6/28/2025, 9:55:40 AM

Last updated: 8/11/2025, 5:17:56 AM

Views: 16

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats