Skip to main content

CVE-2024-26586: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-26586cvecve-2024-26586
Published: Thu Feb 22 2024 (02/22/2024, 16:13:31 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mlxsw: spectrum_acl_tcam: Fix stack corruption When tc filters are first added to a net device, the corresponding local port gets bound to an ACL group in the device. The group contains a list of ACLs. In turn, each ACL points to a different TCAM region where the filters are stored. During forwarding, the ACLs are sequentially evaluated until a match is found. One reason to place filters in different regions is when they are added with decreasing priorities and in an alternating order so that two consecutive filters can never fit in the same region because of their key usage. In Spectrum-2 and newer ASICs the firmware started to report that the maximum number of ACLs in a group is more than 16, but the layout of the register that configures ACL groups (PAGT) was not updated to account for that. It is therefore possible to hit stack corruption [1] in the rare case where more than 16 ACLs in a group are required. Fix by limiting the maximum ACL group size to the minimum between what the firmware reports and the maximum ACLs that fit in the PAGT register. Add a test case to make sure the machine does not crash when this condition is hit. [1] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: mlxsw_sp_acl_tcam_group_update+0x116/0x120 [...] dump_stack_lvl+0x36/0x50 panic+0x305/0x330 __stack_chk_fail+0x15/0x20 mlxsw_sp_acl_tcam_group_update+0x116/0x120 mlxsw_sp_acl_tcam_group_region_attach+0x69/0x110 mlxsw_sp_acl_tcam_vchunk_get+0x492/0xa20 mlxsw_sp_acl_tcam_ventry_add+0x25/0xe0 mlxsw_sp_acl_rule_add+0x47/0x240 mlxsw_sp_flower_replace+0x1a9/0x1d0 tc_setup_cb_add+0xdc/0x1c0 fl_hw_replace_filter+0x146/0x1f0 fl_change+0xc17/0x1360 tc_new_tfilter+0x472/0xb90 rtnetlink_rcv_msg+0x313/0x3b0 netlink_rcv_skb+0x58/0x100 netlink_unicast+0x244/0x390 netlink_sendmsg+0x1e4/0x440 ____sys_sendmsg+0x164/0x260 ___sys_sendmsg+0x9a/0xe0 __sys_sendmsg+0x7a/0xc0 do_syscall_64+0x40/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0x6b

AI-Powered Analysis

AILast updated: 06/29/2025, 20:55:29 UTC

Technical Analysis

CVE-2024-26586 is a vulnerability identified in the Linux kernel's mlxsw driver, specifically within the spectrum_acl_tcam component responsible for managing Access Control Lists (ACLs) in network devices. The vulnerability arises due to a mismatch between the firmware-reported maximum number of ACLs in a group and the actual hardware register layout (PAGT register) that configures these ACL groups. In Spectrum-2 and newer ASICs, the firmware reports support for more than 16 ACLs per group, but the PAGT register was not updated accordingly, leading to a scenario where exceeding 16 ACLs in a group causes stack corruption. This stack corruption manifests as a kernel panic triggered by the stack protector detecting corruption during ACL group updates, specifically in the function mlxsw_sp_acl_tcam_group_update. The issue occurs when traffic control (tc) filters are added to a network device, binding local ports to ACL groups that sequentially evaluate filters stored in different TCAM regions. The vulnerability is rare and triggered only when more than 16 ACLs are required in a group, which can happen when filters are added with decreasing priorities and alternating orders that prevent consecutive filters from fitting in the same TCAM region. The fix involves limiting the maximum ACL group size to the minimum of the firmware-reported maximum and the maximum supported by the PAGT register, preventing stack corruption. A test case was also added to ensure system stability when this condition is encountered. No known exploits are reported in the wild, and the vulnerability does not have an assigned CVSS score yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels on hardware using Spectrum-2 or newer ASICs with the mlxsw driver, commonly found in network infrastructure devices such as switches and routers. Exploitation could lead to kernel panics causing denial of service (DoS) conditions, disrupting network traffic and potentially impacting critical services reliant on stable network connectivity. While the vulnerability does not directly lead to privilege escalation or remote code execution, the resulting system crashes could affect availability and operational continuity. Organizations with complex network configurations using extensive ACLs may be more susceptible, especially in data centers, ISPs, and enterprises with advanced traffic filtering needs. The lack of known exploits reduces immediate risk, but the potential for DoS in critical network components necessitates prompt attention. Additionally, the vulnerability could complicate network management and troubleshooting, increasing operational overhead.

Mitigation Recommendations

European organizations should apply the Linux kernel patches that address CVE-2024-26586 as soon as they become available from their Linux distribution vendors. In the interim, network administrators should audit their ACL configurations to ensure that no ACL group exceeds 16 entries, especially on devices using Spectrum-2 or newer ASICs with the mlxsw driver. Monitoring kernel logs for stack protector warnings or kernel panics related to mlxsw_sp_acl_tcam_group_update can help detect attempts to trigger the vulnerability. Network teams should also review traffic control filter deployment practices to avoid adding filters in decreasing priority orders that could cause excessive ACL group sizes. Where possible, segmenting network traffic and distributing ACLs across multiple groups or devices can reduce the risk of hitting the ACL group size limit. Finally, organizations should maintain up-to-date backups and have incident response plans ready to address potential network outages caused by this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-19T14:20:24.125Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982bc4522896dcbe40bc

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

Last enriched: 6/29/2025, 8:55:29 PM

Last updated: 8/17/2025, 12:05:13 PM

Views: 15

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