CVE-2024-35852
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
17/05/2024
Last modified:
30/12/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
mlxsw: spectrum_acl_tcam: Fix memory leak when canceling rehash work<br />
<br />
The rehash delayed work is rescheduled with a delay if the number of<br />
credits at end of the work is not negative as supposedly it means that<br />
the migration ended. Otherwise, it is rescheduled immediately.<br />
<br />
After "mlxsw: spectrum_acl_tcam: Fix possible use-after-free during<br />
rehash" the above is no longer accurate as a non-negative number of<br />
credits is no longer indicative of the migration being done. It can also<br />
happen if the work encountered an error in which case the migration will<br />
resume the next time the work is scheduled.<br />
<br />
The significance of the above is that it is possible for the work to be<br />
pending and associated with hints that were allocated when the migration<br />
started. This leads to the hints being leaked [1] when the work is<br />
canceled while pending as part of ACL region dismantle.<br />
<br />
Fix by freeing the hints if hints are associated with a work that was<br />
canceled while pending.<br />
<br />
Blame the original commit since the reliance on not having a pending<br />
work associated with hints is fragile.<br />
<br />
[1]<br />
unreferenced object 0xffff88810e7c3000 (size 256):<br />
comm "kworker/0:16", pid 176, jiffies 4295460353<br />
hex dump (first 32 bytes):<br />
00 30 95 11 81 88 ff ff 61 00 00 00 00 00 00 80 .0......a.......<br />
00 00 61 00 40 00 00 00 00 00 00 00 04 00 00 00 ..a.@...........<br />
backtrace (crc 2544ddb9):<br />
[] kmalloc_trace+0x23f/0x2a0<br />
[] objagg_hints_get+0x42/0x390<br />
[] mlxsw_sp_acl_erp_rehash_hints_get+0xca/0x400<br />
[] mlxsw_sp_acl_tcam_vregion_rehash_work+0x868/0x1160<br />
[] process_one_work+0x59c/0xf20<br />
[] worker_thread+0x799/0x12c0<br />
[] kthread+0x246/0x300<br />
[] ret_from_fork+0x34/0x70<br />
[] ret_from_fork_asm+0x1a/0x30
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.1 (including) | 5.4.275 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.216 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.158 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.90 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.30 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.8.9 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc5:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/51cefc9da400b953fee749c9e5d26cd4a2b5d758
- https://git.kernel.org/stable/c/5bfe7bf9656ed2633718388f12b7c38b86414a04
- https://git.kernel.org/stable/c/63d814d93c5cce4c18284adc810028f28dca493f
- https://git.kernel.org/stable/c/857ed800133ffcfcee28582090b63b0cbb8ba59d
- https://git.kernel.org/stable/c/d72dd6fcd7886d0523afbab8b4a4b22d17addd7d
- https://git.kernel.org/stable/c/de1aaefa75be9d0ec19c9a3e0e2f9696de20c6ab
- https://git.kernel.org/stable/c/fb4e2b70a7194b209fc7320bbf33b375f7114bd5
- https://git.kernel.org/stable/c/51cefc9da400b953fee749c9e5d26cd4a2b5d758
- https://git.kernel.org/stable/c/5bfe7bf9656ed2633718388f12b7c38b86414a04
- https://git.kernel.org/stable/c/63d814d93c5cce4c18284adc810028f28dca493f
- https://git.kernel.org/stable/c/857ed800133ffcfcee28582090b63b0cbb8ba59d
- https://git.kernel.org/stable/c/d72dd6fcd7886d0523afbab8b4a4b22d17addd7d
- https://git.kernel.org/stable/c/de1aaefa75be9d0ec19c9a3e0e2f9696de20c6ab
- https://git.kernel.org/stable/c/fb4e2b70a7194b209fc7320bbf33b375f7114bd5
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html



