CVE-2024-35853: mlxsw: spectrum_acl_tcam: Fix memory leak during rehash

Published May 17, 2024
·
Updated

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

mlxsw: spectrumacltcam: Fix memory leak during rehash

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

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051740-CVE-2024-35853-869a@gregkh/T

Other sources

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

mlxsw: spectrumacltcam: Fix memory leak during rehash

The rehash delayed work migrates filters from one region to another. This is done by iterating over all chunks (all the filters with the same priority) in the region and in each chunk iterating over all the filters.

If the migration fails, the code tries to migrate the filters back to the old region. However, the rollback itself can also fail in which case another migration will be erroneously performed. Besides the fact that this ping pong is not a very good idea, it also creates a problem.

Each virtual chunk references two chunks: The currently used one ('vchunk->chunk') and a backup ('vchunk->chunk2'). During migration the first holds the chunk we want to migrate filters to and the second holds the chunk we are migrating filters from.

The code currently assumes - but does not verify - that the backup chunk does not exist (NULL) if the currently used chunk does not reference the target region. This assumption breaks when we are trying to rollback a rollback, resulting in the backup chunk being overwritten and leaked [1].

Fix by not rolling back a failed rollback and add a warning to avoid future cases.

[1] WARNING: CPU: 5 PID: 1063 at lib/parman.c:291 parmandestroy+0x17/0x20 Modules linked in: CPU: 5 PID: 1063 Comm: kworker/5:11 Tainted: G W 6.9.0-rc2-custom-00784-gc6a05c468a0b #14 Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019 Workqueue: mlxswcore mlxswspacltcamvregionrehashwork RIP: 0010:parmandestroy+0x17/0x20 [...] Call Trace: mlxswspaclatcamregionfini+0x19/0x60 mlxswspacltcamregiondestroy+0x49/0xf0 mlxswspacltcamvregionrehashwork+0x1f1/0x470 processonework+0x151/0x370 workerthread+0x2cb/0x3e0 kthread+0xd0/0x100 retfromfork+0x34/0x50 retfromforkasm+0x1a/0x30

IBM

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

mlxsw: spectrumacltcam: Fix memory leak during rehash

The rehash delayed work migrates filters from one region to another. This is done by iterating over all chunks (all the filters with the same priority) in the region and in each chunk iterating over all the filters.

If the migration fails, the code tries to migrate the filters back to the old region. However, the rollback itself can also fail in which case another migration will be erroneously performed. Besides the fact that this ping pong is not a very good idea, it also creates a problem.

Each virtual chunk references two chunks: The currently used one ('vchunk->chunk') and a backup ('vchunk->chunk2'). During migration the first holds the chunk we want to migrate filters to and the second holds the chunk we are migrating filters from.

The code currently assumes - but does not verify - that the backup chunk does not exist (NULL) if the currently used chunk does not reference the target region. This assumption breaks when we are trying to rollback a rollback, resulting in the backup chunk being overwritten and leaked [1].

Fix by not rolling back a failed rollback and add a warning to avoid future cases.

[1] WARNING: CPU: 5 PID: 1063 at lib/parman.c:291 parmandestroy+0x17/0x20 Modules linked in: CPU: 5 PID: 1063 Comm: kworker/5:11 Tainted: G W 6.9.0-rc2-custom-00784-gc6a05c468a0b #14 Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019 Workqueue: mlxswcore mlxswspacltcamvregionrehashwork RIP: 0010:parmandestroy+0x17/0x20 [...] Call Trace: <TASK> mlxswspaclatcamregionfini+0x19/0x60 mlxswspacltcamregiondestroy+0x49/0xf0 mlxswspacltcamvregionrehashwork+0x1f1/0x470 processonework+0x151/0x370 workerthread+0x2cb/0x3e0 kthread+0xd0/0x100 retfromfork+0x34/0x50 retfromforkasm+0x1a/0x30 </TASK>

NVD

Affected Software

26 affected componentsFixes available
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
Debian Debian Linux=10.0
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
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
Microsoft azl3 hyperv-daemons 6.6.29.1-1
Microsoft azl3 hyperv-daemons 6.6.35.1-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:22 AM
DescriptionSeverityAffected Software
Jul 12, 2024
Data Sourced
via Launchpad·02:47 PM
Description
Aug 15, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
May 5, 2025
Data Sourced
via Ubuntu·12:20 AM
RemedyDescriptionSeverityAffected Software
May 13, 2025
Data Sourced
via Debian·12:21 AM
DescriptionAffected 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-35853?

CVE-2024-35853 has a severity rating that can lead to potential memory leaks in the Linux kernel.

2

How do I fix CVE-2024-35853?

To resolve CVE-2024-35853, update your Linux kernel to versions 5.4.275, 5.10.216, 5.15.158, 6.1.90, 6.6.30, 6.8.9, or 6.9 as appropriate.

3

Which Linux distributions are affected by CVE-2024-35853?

CVE-2024-35853 affects the Linux kernel in various distributions such as Red Hat and Debian.

4

Is there a patch available for CVE-2024-35853?

Yes, patches for CVE-2024-35853 are included in the updated versions of the affected Linux kernel packages.

5

What components of the Linux kernel are impacted by CVE-2024-35853?

CVE-2024-35853 specifically impacts the mlxsw spectrum_acl_tcam, which is associated with memory management 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