CVE-2024-26902: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: perf: RISCV: Fix panic on pmu overflow handler (1 << idx) of int is not desired when setting bits in unsigned long overflowed_ctrs, use BIT() instead. This panic happens when running 'perf record -e branches' on sophgo sg2042. [ 273.311852] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098 [ 273.320851] Oops [#1] [ 273.323179] Modules linked in: [ 273.326303] CPU: 0 PID: 1475 Comm: perf Not tainted 6.6.0-rc3+ #9 [ 273.332521] Hardware name: Sophgo Mango (DT) [ 273.336878] epc : riscv_pmu_ctr_get_width_mask+0x8/0x62 [ 273.342291] ra : pmu_sbi_ovf_handler+0x2e0/0x34e [ 273.347091] epc : ffffffff80aecd98 ra : ffffffff80aee056 sp : fffffff6e36928b0 [ 273.354454] gp : ffffffff821f82d0 tp : ffffffd90c353200 t0 : 0000002ade4f9978 [ 273.361815] t1 : 0000000000504d55 t2 : ffffffff8016cd8c s0 : fffffff6e3692a70 [ 273.369180] s1 : 0000000000000020 a0 : 0000000000000000 a1 : 00001a8e81800000 [ 273.376540] a2 : 0000003c00070198 a3 : 0000003c00db75a4 a4 : 0000000000000015 [ 273.383901] a5 : ffffffd7ff8804b0 a6 : 0000000000000015 a7 : 000000000000002a [ 273.391327] s2 : 000000000000ffff s3 : 0000000000000000 s4 : ffffffd7ff8803b0 [ 273.398773] s5 : 0000000000504d55 s6 : ffffffd905069800 s7 : ffffffff821fe210 [ 273.406139] s8 : 000000007fffffff s9 : ffffffd7ff8803b0 s10: ffffffd903f29098 [ 273.413660] s11: 0000000080000000 t3 : 0000000000000003 t4 : ffffffff8017a0ca [ 273.421022] t5 : ffffffff8023cfc2 t6 : ffffffd9040780e8 [ 273.426437] status: 0000000200000100 badaddr: 0000000000000098 cause: 000000000000000d [ 273.434512] [<ffffffff80aecd98>] riscv_pmu_ctr_get_width_mask+0x8/0x62 [ 273.441169] [<ffffffff80076bd8>] handle_percpu_devid_irq+0x98/0x1ee [ 273.447562] [<ffffffff80071158>] generic_handle_domain_irq+0x28/0x36 [ 273.454151] [<ffffffff8047a99a>] riscv_intc_irq+0x36/0x4e [ 273.459659] [<ffffffff80c944de>] handle_riscv_irq+0x4a/0x74 [ 273.465442] [<ffffffff80c94c48>] do_irq+0x62/0x92 [ 273.470360] Code: 0420 60a2 6402 5529 0141 8082 0013 0000 0013 0000 (6d5c) b783 [ 273.477921] ---[ end trace 0000000000000000 ]--- [ 273.482630] Kernel panic - not syncing: Fatal exception in interrupt
AI Analysis
Technical Summary
CVE-2024-26902 is a vulnerability identified in the Linux kernel specifically affecting the performance monitoring unit (PMU) implementation for the RISC-V architecture. The flaw arises from improper bit manipulation in the overflow handler of the PMU, where the code incorrectly uses a left shift operation on an int type to set bits in an unsigned long variable, 'overflowed_ctrs'. The correct approach should use the BIT() macro to ensure proper bit setting. This coding error leads to a kernel panic triggered by a NULL pointer dereference when running the 'perf record -e branches' command on systems using the Sophgo SG2042 RISC-V hardware platform. The panic manifests as a fatal exception in interrupt context, causing the kernel to halt and become unresponsive. The vulnerability is rooted in the riscv_pmu_ctr_get_width_mask function and the pmu_sbi_ovf_handler, which handle PMU counter width masking and overflow interrupts respectively. The issue was observed on Linux kernel version 6.6.0-rc3+ and results in an unrecoverable kernel panic, which can be exploited by local users executing performance monitoring commands. Although no known exploits are currently reported in the wild, the vulnerability poses a risk of denial of service (DoS) by crashing the kernel on affected RISC-V systems. The vulnerability is specific to the RISC-V PMU implementation and the Sophgo Mango platform, indicating a narrow but critical attack surface in environments utilizing this hardware and kernel combination. The patch involves correcting the bit manipulation logic to use the BIT() macro, preventing the NULL pointer dereference and subsequent kernel panic.
Potential Impact
For European organizations, the primary impact of CVE-2024-26902 is the potential for local denial of service on Linux systems running on RISC-V architecture, particularly those using Sophgo SG2042 or similar hardware. This could disrupt critical services, especially in sectors relying on RISC-V embedded systems or specialized computing platforms such as telecommunications, industrial control, or research institutions adopting RISC-V technology. The kernel panic leads to system crashes requiring manual intervention or automated recovery mechanisms, potentially causing downtime and loss of availability. Confidentiality and integrity impacts are minimal as the vulnerability does not allow privilege escalation or arbitrary code execution. However, the availability impact can be significant in environments where uptime is critical. Given the emerging adoption of RISC-V in Europe, particularly in research and niche industrial applications, organizations using these platforms must be vigilant. The lack of known exploits reduces immediate risk, but the vulnerability's presence in a core kernel component means that exploitation could be straightforward for local users with access to the system. This could include internal threat actors or attackers who have gained limited access. The impact is thus primarily operational, affecting system stability and reliability.
Mitigation Recommendations
European organizations should take the following specific mitigation steps: 1) Identify and inventory all Linux systems running on RISC-V architecture, especially those using Sophgo SG2042 or related hardware platforms. 2) Apply the latest Linux kernel patches that address CVE-2024-26902 as soon as they become available, ensuring the corrected bit manipulation logic is included. 3) Restrict access to performance monitoring tools such as 'perf' to trusted users only, minimizing the risk of accidental or malicious triggering of the vulnerability. 4) Implement monitoring and alerting for kernel panics and system crashes on RISC-V systems to enable rapid response and remediation. 5) For critical systems where patching may be delayed, consider disabling or limiting the use of PMU overflow handlers or the 'perf record -e branches' functionality as a temporary workaround. 6) Engage with hardware vendors and Linux distribution maintainers to confirm the availability and deployment of patches. 7) Incorporate this vulnerability into incident response and risk assessment processes, emphasizing the potential for local DoS attacks. These steps go beyond generic advice by focusing on hardware-specific inventory, access control to performance tools, and proactive monitoring tailored to the RISC-V environment.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland
CVE-2024-26902: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: perf: RISCV: Fix panic on pmu overflow handler (1 << idx) of int is not desired when setting bits in unsigned long overflowed_ctrs, use BIT() instead. This panic happens when running 'perf record -e branches' on sophgo sg2042. [ 273.311852] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098 [ 273.320851] Oops [#1] [ 273.323179] Modules linked in: [ 273.326303] CPU: 0 PID: 1475 Comm: perf Not tainted 6.6.0-rc3+ #9 [ 273.332521] Hardware name: Sophgo Mango (DT) [ 273.336878] epc : riscv_pmu_ctr_get_width_mask+0x8/0x62 [ 273.342291] ra : pmu_sbi_ovf_handler+0x2e0/0x34e [ 273.347091] epc : ffffffff80aecd98 ra : ffffffff80aee056 sp : fffffff6e36928b0 [ 273.354454] gp : ffffffff821f82d0 tp : ffffffd90c353200 t0 : 0000002ade4f9978 [ 273.361815] t1 : 0000000000504d55 t2 : ffffffff8016cd8c s0 : fffffff6e3692a70 [ 273.369180] s1 : 0000000000000020 a0 : 0000000000000000 a1 : 00001a8e81800000 [ 273.376540] a2 : 0000003c00070198 a3 : 0000003c00db75a4 a4 : 0000000000000015 [ 273.383901] a5 : ffffffd7ff8804b0 a6 : 0000000000000015 a7 : 000000000000002a [ 273.391327] s2 : 000000000000ffff s3 : 0000000000000000 s4 : ffffffd7ff8803b0 [ 273.398773] s5 : 0000000000504d55 s6 : ffffffd905069800 s7 : ffffffff821fe210 [ 273.406139] s8 : 000000007fffffff s9 : ffffffd7ff8803b0 s10: ffffffd903f29098 [ 273.413660] s11: 0000000080000000 t3 : 0000000000000003 t4 : ffffffff8017a0ca [ 273.421022] t5 : ffffffff8023cfc2 t6 : ffffffd9040780e8 [ 273.426437] status: 0000000200000100 badaddr: 0000000000000098 cause: 000000000000000d [ 273.434512] [<ffffffff80aecd98>] riscv_pmu_ctr_get_width_mask+0x8/0x62 [ 273.441169] [<ffffffff80076bd8>] handle_percpu_devid_irq+0x98/0x1ee [ 273.447562] [<ffffffff80071158>] generic_handle_domain_irq+0x28/0x36 [ 273.454151] [<ffffffff8047a99a>] riscv_intc_irq+0x36/0x4e [ 273.459659] [<ffffffff80c944de>] handle_riscv_irq+0x4a/0x74 [ 273.465442] [<ffffffff80c94c48>] do_irq+0x62/0x92 [ 273.470360] Code: 0420 60a2 6402 5529 0141 8082 0013 0000 0013 0000 (6d5c) b783 [ 273.477921] ---[ end trace 0000000000000000 ]--- [ 273.482630] Kernel panic - not syncing: Fatal exception in interrupt
AI-Powered Analysis
Technical Analysis
CVE-2024-26902 is a vulnerability identified in the Linux kernel specifically affecting the performance monitoring unit (PMU) implementation for the RISC-V architecture. The flaw arises from improper bit manipulation in the overflow handler of the PMU, where the code incorrectly uses a left shift operation on an int type to set bits in an unsigned long variable, 'overflowed_ctrs'. The correct approach should use the BIT() macro to ensure proper bit setting. This coding error leads to a kernel panic triggered by a NULL pointer dereference when running the 'perf record -e branches' command on systems using the Sophgo SG2042 RISC-V hardware platform. The panic manifests as a fatal exception in interrupt context, causing the kernel to halt and become unresponsive. The vulnerability is rooted in the riscv_pmu_ctr_get_width_mask function and the pmu_sbi_ovf_handler, which handle PMU counter width masking and overflow interrupts respectively. The issue was observed on Linux kernel version 6.6.0-rc3+ and results in an unrecoverable kernel panic, which can be exploited by local users executing performance monitoring commands. Although no known exploits are currently reported in the wild, the vulnerability poses a risk of denial of service (DoS) by crashing the kernel on affected RISC-V systems. The vulnerability is specific to the RISC-V PMU implementation and the Sophgo Mango platform, indicating a narrow but critical attack surface in environments utilizing this hardware and kernel combination. The patch involves correcting the bit manipulation logic to use the BIT() macro, preventing the NULL pointer dereference and subsequent kernel panic.
Potential Impact
For European organizations, the primary impact of CVE-2024-26902 is the potential for local denial of service on Linux systems running on RISC-V architecture, particularly those using Sophgo SG2042 or similar hardware. This could disrupt critical services, especially in sectors relying on RISC-V embedded systems or specialized computing platforms such as telecommunications, industrial control, or research institutions adopting RISC-V technology. The kernel panic leads to system crashes requiring manual intervention or automated recovery mechanisms, potentially causing downtime and loss of availability. Confidentiality and integrity impacts are minimal as the vulnerability does not allow privilege escalation or arbitrary code execution. However, the availability impact can be significant in environments where uptime is critical. Given the emerging adoption of RISC-V in Europe, particularly in research and niche industrial applications, organizations using these platforms must be vigilant. The lack of known exploits reduces immediate risk, but the vulnerability's presence in a core kernel component means that exploitation could be straightforward for local users with access to the system. This could include internal threat actors or attackers who have gained limited access. The impact is thus primarily operational, affecting system stability and reliability.
Mitigation Recommendations
European organizations should take the following specific mitigation steps: 1) Identify and inventory all Linux systems running on RISC-V architecture, especially those using Sophgo SG2042 or related hardware platforms. 2) Apply the latest Linux kernel patches that address CVE-2024-26902 as soon as they become available, ensuring the corrected bit manipulation logic is included. 3) Restrict access to performance monitoring tools such as 'perf' to trusted users only, minimizing the risk of accidental or malicious triggering of the vulnerability. 4) Implement monitoring and alerting for kernel panics and system crashes on RISC-V systems to enable rapid response and remediation. 5) For critical systems where patching may be delayed, consider disabling or limiting the use of PMU overflow handlers or the 'perf record -e branches' functionality as a temporary workaround. 6) Engage with hardware vendors and Linux distribution maintainers to confirm the availability and deployment of patches. 7) Incorporate this vulnerability into incident response and risk assessment processes, emphasizing the potential for local DoS attacks. These steps go beyond generic advice by focusing on hardware-specific inventory, access control to performance tools, and proactive monitoring tailored to the RISC-V environment.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-02-19T14:20:24.187Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d982bc4522896dcbe3ed6
Added to database: 5/21/2025, 9:08:59 AM
Last enriched: 6/29/2025, 8:10:16 PM
Last updated: 8/17/2025, 5:16:20 PM
Views: 13
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.