Vulnerability · Published May 17, 2024 · Assigned by Linux

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

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.3%top 82.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9bpftool7.3.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug-devel-matched5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-debug-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-devel-matched5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-64k-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-abi-stablelists5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-cross-headers5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-devel-matched5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-debug-uki-virt5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-devel-matched5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-doc5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-headers5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-core4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-debug4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-debug5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-debug-core4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-debug-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-debug-devel4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-debug-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-debug-kvm4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug-modules4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-debug-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-rt-debug-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-debug-modules-extra4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-debug-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-devel4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-kvm4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-modules4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-rt-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:8kernel-rt-modules-extra4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:9kernel-rt-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-tools5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-tools-libs5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-tools-libs-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-uki-virt5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump-devel5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump-devel-matched5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump-modules5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump-modules-core5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9kernel-zfcpdump-modules-extra5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9libperf5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9perf5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9python3-perf5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9rtla5.14.0-427.31.1.el9_4ALSA-2024:5363
AlmaLinux:9rv5.14.0-427.31.1.el9_4ALSA-2024:5363
Debian:12linux6.1.90-1DEBIAN-CVE-2024-35852
Debian:13linux6.8.9-1DEBIAN-CVE-2024-35852
Debian:14linux6.8.9-1DEBIAN-CVE-2024-35852
Rocky Linux:9kernel0:5.14.0-427.31.1.el9_4RLSA-2024:5363
Rocky Linux:8kernel-rt0:4.18.0-553.8.1.rt7.349.el8_10RLSA-2024:4352
Ubuntu:22.04:LTSlinux5.15.0-116.126UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux6.8.0-40.40USN-6949-1
Ubuntu:24.04:LTSlinux6.8.0-40.40UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-aws5.15.0-1065.71UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-aws6.8.0-1013.14USN-6949-1
Ubuntu:24.04:LTSlinux-aws6.8.0-1013.14UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1013.14~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure5.15.0-1068.77UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-azure6.8.0-1012.14UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-azure6.8.0-1012.14USN-6952-2
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1012.14~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1068.77.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-gcp5.15.0-1064.72UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-gcp6.8.0-1012.13UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-gcp6.8.0-1012.13USN-6949-1
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1012.13~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-gke5.15.0-1062.68UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-gke6.8.0-1008.11USN-6949-1
Ubuntu:24.04:LTSlinux-gke6.8.0-1008.11UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1048.55UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-40.40~22.04.3UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-ibm5.15.0-1058.61UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-ibm6.8.0-1010.10UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-ibm6.8.0-1010.10USN-6949-1
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1010.10~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1060.66UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-kvm5.15.0-1062.67UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-116.126UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-40.40.1UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-40.40.1USN-6949-2
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-40.40.1~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1060.61UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1011.11UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1011.11USN-6949-1
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1011.11~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1011.11~22.04.1USN-6949-1
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1011.11.1USN-6952-1
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1011.11.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1026.26UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1010.10USN-6955-1
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1010.10UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-oracle5.15.0-1063.69UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-oracle6.8.0-1010.10UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-oracle6.8.0-1010.10USN-6952-1
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1010.10~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-raspi5.15.0-1058.61UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-raspi6.8.0-1009.10UBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-raspi6.8.0-1009.10USN-6949-2
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-35852
Ubuntu:24.04:LTSlinux-riscv6.8.0-40.40.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-40.40.1~22.04.1UBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-35852
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1035.39UBUNTU-CVE-2024-35852

Affected products (as reported)

VendorProductVersions
Linux Linux c9c9af91f1d9a636aecc55302c792538e549a430 – before 51cefc9da400b953fee749c9e5d26cd4a2b5d758c9c9af91f1d9a636aecc55302c792538e549a430 – before 857ed800133ffcfcee28582090b63b0cbb8ba59dc9c9af91f1d9a636aecc55302c792538e549a430 – before 63d814d93c5cce4c18284adc810028f28dca493fc9c9af91f1d9a636aecc55302c792538e549a430 – before 5bfe7bf9656ed2633718388f12b7c38b86414a04c9c9af91f1d9a636aecc55302c792538e549a430 – before de1aaefa75be9d0ec19c9a3e0e2f9696de20c6abc9c9af91f1d9a636aecc55302c792538e549a430 – before d72dd6fcd7886d0523afbab8b4a4b22d17addd7dc9c9af91f1d9a636aecc55302c792538e549a430 – before fb4e2b70a7194b209fc7320bbf33b375f7114bd5
Linux Linux 5.1

References