CVE-2024-35852: mlxsw: spectrum_acl_tcam: Fix memory leak when canceling rehash work
In the Linux kernel, the following vulnerability has been resolved:
mlxsw: spectrum_acl_tcam: Fix memory leak when canceling rehash work
The rehash delayed work is rescheduled with a delay if the number of
credits at end of the work is not negative as supposedly it means that
the migration ended. Otherwise, it is rescheduled immediately.
After "mlxsw: spectrum_acl_tcam: Fix possible use-after-free during
rehash" the above is no longer accurate as a non-negative number of
credits is no longer indicative of the migration being done. It can also
happen if the work encountered an error in which case the migration will
resume the next time the work is scheduled.
The significance of the above is that it is possible for the work to be
pending and associated with hints that were allocated when the migration
started. This leads to the hints being leaked [1] when the work is
canceled while pending as part of ACL region dismantle.
Fix by freeing the hints if hints are associated with a work that was
canceled while pending.
Blame the original commit since the reliance on not having a pending
work associated with hints is fragile.
[1]
unreferenced object 0xffff88810e7c3000 (size 256):
comm "kworker/0:16", pid 176, jiffies 4295460353
hex dump (first 32 bytes):
00 30 95 11 81 88 ff ff 61 00 00 00 00 00 00 80 .0......a.......
00 00 61 00 40 00 00 00 00 00 00 00 04 00 00 00 ..a.@...........
backtrace (crc 2544ddb9):
[<00000000cf8cfab3>] kmalloc_trace+0x23f/0x2a0
[<000000004d9a1ad9>] objagg_hints_get+0x42/0x390
[<000000000b143cf3>] mlxsw_sp_acl_erp_rehash_hints_get+0xca/0x400
[<0000000059bdb60a>] mlxsw_sp_acl_tcam_vregion_rehash_work+0x868/0x1160
[<00000000e81fd734>] process_one_work+0x59c/0xf20
[<00000000ceee9e81>] worker_thread+0x799/0x12c0
[<00000000bda6fe39>] kthread+0x246/0x300
[<0000000070056d23>] ret_from_fork+0x34/0x70
[<00000000dea2b93e>] ret_from_fork_asm+0x1a/0x30
Security readout for executives and security teams
Plain-English summary
CVE-2024-35852 is a Linux kernel memory leak in the mlxsw Spectrum ACL TCAM code. It can leak allocated rehash hint memory when pending rehash work is canceled during ACL region teardown. The public record does not provide a CVSS score or confirmed exploitation.
Executive priority
Treat as a targeted kernel maintenance issue, not an emergency based on current evidence. Patch affected networking infrastructure during the next appropriate maintenance window, faster where Spectrum switch ASIC systems run production ACL workloads.
Technical view
The flaw is in mlxsw spectrum_acl_tcam rehash work handling. After an earlier use-after-free fix, non-negative credits no longer reliably meant migration completion. Pending work could still retain allocated hints, and canceling that work during ACL region dismantle leaked those hints. Stable kernel commits free associated hints on cancellation.
Likely exposure
Exposure appears limited to Linux systems using the mlxsw Spectrum networking driver and ACL TCAM functionality. The source bundle lists affected Linux kernel versions and stable backport commits but does not identify broader products beyond Linux.
Exploitation context
No active exploitation is supported by the supplied sources. The CVE is not marked KEV, and the available description frames this as a memory leak found through kernel diagnostics rather than a publicly exploited issue.
Researcher notes
The key condition is cancellation of pending delayed rehash work with retained hints during ACL region dismantle. Evidence does not establish attacker reachability, privilege requirements, or impact beyond memory leakage, so validation should focus on affected driver use and backport presence.
Mitigation direction
Update to a vendor kernel containing the referenced stable fixes.
Check distribution advisories for the exact fixed kernel package.
Prioritize systems using Mellanox/NVIDIA Spectrum switching hardware and mlxsw.
Follow vendor guidance where kernel version mappings are unclear.
Validation and detection
Inventory kernels against the affected and fixed versions in the CVE record.
Confirm whether the mlxsw Spectrum driver is present and in use.
Check vendor package changelogs for CVE-2024-35852 or the stable commit IDs.
Review kernel diagnostics for memory leak indicators if debugging is enabled.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-35852 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.