CVE-2024-35852: mlxsw: spectrum_acl_tcam: Fix memory leak when canceling rehash work

Published May 17, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mlxsw: spectrumacltcam: Fix memory leak when canceling rehash work

The Linux kernel CVE team has assigned CVE-2024-35852 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051740-CVE-2024-35852-9e9a@gregkh/T

Other sources

In the Linux kernel, the following vulnerability has been resolved:

mlxsw: spectrumacltcam: 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: spectrumacltcam: 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>] kmalloctrace+0x23f/0x2a0 [<000000004d9a1ad9>] objagghintsget+0x42/0x390 [<000000000b143cf3>] mlxswspaclerprehashhintsget+0xca/0x400 [<0000000059bdb60a>] mlxswspacltcamvregionrehashwork+0x868/0x1160 [<00000000e81fd734>] processonework+0x59c/0xf20 [<00000000ceee9e81>] workerthread+0x799/0x12c0 [<00000000bda6fe39>] kthread+0x246/0x300 [<0000000070056d23>] retfromfork+0x34/0x70 [<00000000dea2b93e>] retfromforkasm+0x1a/0x30

NVD

Affected Software

23 affected componentsFixes available
redhat/kernel<5.4.275
5.4.275
redhat/kernel<5.10.216
5.10.216
redhat/kernel<5.15.158
5.15.158
redhat/kernel<6.1.90
6.1.90
redhat/kernel<6.6.30
6.6.30
redhat/kernel<6.8.9
6.8.9
redhat/kernel<6.9
6.9
Linux Linux kernel>=5.1<5.4.275
Linux Linux kernel>=5.5<5.10.216
Linux Linux kernel>=5.11<5.15.158
Linux Linux kernel>=5.16<6.1.90
Linux Linux kernel>=6.2<6.6.30
Linux Linux kernel>=6.7<6.8.9
Linux Linux kernel=6.9-rc1
Linux Linux kernel=6.9-rc2
Linux Linux kernel=6.9-rc3
Linux Linux kernel=6.9-rc4
Linux Linux kernel=6.9-rc5
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1

Event History

May 17, 2024
CVE Published
via MITRE·02:47 PM
Data Sourced
via MITRE·02:47 PM
Description
May 18, 2024
Data Sourced
via Red Hat·12:24 AM
DescriptionSeverityAffected Software
Jul 12, 2024
Data Sourced
via Launchpad·02:47 PM
Description
Apr 27, 2025
Data Sourced
via Ubuntu·12:17 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-35852?

CVE-2024-35852 is classified as a memory leak vulnerability in the Linux kernel.

2

How do I fix CVE-2024-35852?

To fix CVE-2024-35852, update the kernel to versions 5.4.276, 5.10.217, 5.15.159, 6.1.91, 6.6.31, 6.8.10 or later.

3

What software versions are affected by CVE-2024-35852?

CVE-2024-35852 affects Linux kernel versions below 5.4.276, 5.10.217, 5.15.159, 6.1.91, 6.6.31, and 6.8.10.

4

Is CVE-2024-35852 related to a specific Linux distribution?

Yes, CVE-2024-35852 primarily affects Red Hat and Debian Linux distributions.

5

What are the consequences of CVE-2024-35852?

The consequences of CVE-2024-35852 include potential performance degradation due to memory leaks in the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203