{"dataType":"CVE_RECORD","cveMetadata":{"cveId":"CVE-2024-36007","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-05-17T13:50:33.151Z","datePublished":"2024-05-20T09:48:06.947Z","dateUpdated":"2026-08-05T11:31:32.799Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:31:32.799Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmlxsw: spectrum_acl_tcam: Fix warning during rehash\n\nAs previously explained, the rehash delayed work migrates filters from\none region to another. This is done by iterating over all chunks (all\nthe filters with the same priority) in the region and in each chunk\niterating over all the filters.\n\nWhen the work runs out of credits it stores the current chunk and entry\nas markers in the per-work context so that it would know where to resume\nthe migration from the next time the work is scheduled.\n\nUpon error, the chunk marker is reset to NULL, but without resetting the\nentry markers despite being relative to it. This can result in migration\nbeing resumed from an entry that does not belong to the chunk being\nmigrated. In turn, this will eventually lead to a chunk being iterated\nover as if it is an entry. Because of how the two structures happen to\nbe defined, this does not lead to KASAN splats, but to warnings such as\n[1].\n\nFix by creating a helper that resets all the markers and call it from\nall the places the currently only reset the chunk marker. For good\nmeasures also call it when starting a completely new rehash. Add a\nwarning to avoid future cases.\n\n[1]\nWARNING: CPU: 7 PID: 1076 at drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c:407 mlxsw_afk_encode+0x242/0x2f0\nModules linked in:\nCPU: 7 PID: 1076 Comm: kworker/7:24 Tainted: G        W          6.9.0-rc3-custom-00880-g29e61d91b77b #29\nHardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019\nWorkqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work\nRIP: 0010:mlxsw_afk_encode+0x242/0x2f0\n[...]\nCall Trace:\n <TASK>\n mlxsw_sp_acl_atcam_entry_add+0xd9/0x3c0\n mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0\n mlxsw_sp_acl_tcam_vchunk_migrate_all+0x109/0x290\n mlxsw_sp_acl_tcam_vregion_rehash_work+0x6c/0x470\n process_one_work+0x151/0x370\n worker_thread+0x2cb/0x3e0\n kthread+0xd0/0x100\n ret_from_fork+0x34/0x50\n </TASK>"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached by installing and removing tc flower filters on an mlxsw Spectrum port via rtnetlink, which requires local access to the switch's control plane. There is no path to trigger the rehash migration from received network packets.\nAC:L - The attacker controls both sides of the timing window — installing more than MLXSW_SP_ACL_TCAM_VREGION_REHASH_CREDITS (100) rules deterministically forces the periodic rehash work to be interrupted with a stale start_ventry, and then adding or deleting a rule at a lower priority creates a vchunk that sorts ahead of it, guaranteeing the marker mismatch. The 5-second rehash interval and unlimited retries make this reliably reproducible.\nPR:L - tc filter installation is gated only by netlink_net_capable(CAP_NET_ADMIN) checked against the network namespace's user_ns, and mlxsw ports do not set NETIF_F_NETNS_LOCAL, so a switch port delegated into a container/tenant netns lets an otherwise unprivileged user with a user namespace reach this path. No real root in the init namespace is required.\nUI:N - The rehash delayed work runs automatically every 5 seconds by default and the attacker triggers the whole sequence with their own tc filter operations. No action by any other user is needed.\nS:U - The corruption stays within the kernel's own memory and the switch driver's data structures, all under the same security authority. No hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The fabricated ventry causes wild reads through confused pointers — vgroup memory is read as struct mlxsw_sp_acl_rule_info and encoded into TCAM key registers, and entry->chunk->region->priv is walked from a list pointer, exposing kernel memory contents that can be reflected into observable hardware ACL state.\nI:H - This is a type confusion that yields write primitives — kfree() of an interior offset of another vchunk object corrupts the slab allocator, ventry->entry = new_entry overwrites an rhashtable chain pointer, and garbage-derived rules are programmed into the switch's ACL TCAM, corrupting the packet-filtering security control itself.\nA:H - ventry->entry aliases ht_node.next, which is NULL for the last node in a hash bucket, producing an immediate NULL pointer dereference and oops inside the mlxsw_core workqueue kthread; the resulting slab and rhashtable corruption additionally leads to later panics."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"],"versions":[{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"0b88631855026b55cad901ac28d081e0f358e596","status":"affected","versionType":"git"},{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"1d76bd2a0034d0d08045c1c6adf2235d88982952","status":"affected","versionType":"git"},{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"039992b6d2df097c65f480dcf269de3d2656f573","status":"affected","versionType":"git"},{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"751d352858108314efd33dddd5a9a2b6bf7d6916","status":"affected","versionType":"git"},{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"e890456051fe8c57944b911defb3e6de91315861","status":"affected","versionType":"git"},{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"17e9e0bbae652b9b2049e51699e93dfa60b2988d","status":"affected","versionType":"git"},{"version":"6f9579d4e3021b17b0a4cde6b04a6c94c9575cdf","lessThan":"743edc8547a92b6192aa1f1b6bb78233fa21dc9b","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"],"versions":[{"version":"5.1","status":"affected"},{"version":"0","lessThan":"5.1","status":"unaffected","versionType":"semver"},{"version":"5.4.275","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.216","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.158","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.90","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.30","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.8.9","lessThanOrEqual":"6.8.*","status":"unaffected","versionType":"semver"},{"version":"6.9","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.4.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.216"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.158"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.1.90"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.6.30"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.8.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.9"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/0b88631855026b55cad901ac28d081e0f358e596"},{"url":"https://git.kernel.org/stable/c/1d76bd2a0034d0d08045c1c6adf2235d88982952"},{"url":"https://git.kernel.org/stable/c/039992b6d2df097c65f480dcf269de3d2656f573"},{"url":"https://git.kernel.org/stable/c/751d352858108314efd33dddd5a9a2b6bf7d6916"},{"url":"https://git.kernel.org/stable/c/e890456051fe8c57944b911defb3e6de91315861"},{"url":"https://git.kernel.org/stable/c/17e9e0bbae652b9b2049e51699e93dfa60b2988d"},{"url":"https://git.kernel.org/stable/c/743edc8547a92b6192aa1f1b6bb78233fa21dc9b"}],"title":"mlxsw: spectrum_acl_tcam: Fix warning during rehash","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-05-31T18:47:44.179419Z","id":"CVE-2024-36007","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-11-06T15:10:37.319Z"}},{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-02T03:30:11.636Z"},"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/0b88631855026b55cad901ac28d081e0f358e596","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1d76bd2a0034d0d08045c1c6adf2235d88982952","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/039992b6d2df097c65f480dcf269de3d2656f573","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/751d352858108314efd33dddd5a9a2b6bf7d6916","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e890456051fe8c57944b911defb3e6de91315861","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/17e9e0bbae652b9b2049e51699e93dfa60b2988d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/743edc8547a92b6192aa1f1b6bb78233fa21dc9b","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}]},{"x_adpType":"supplier","providerMetadata":{"orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","shortName":"siemens-SADP","dateUpdated":"2026-05-12T11:53:37.257Z"},"affected":[{"vendor":"Siemens","product":"RUGGEDCOM RST2428P","versions":[{"status":"affected","version":"0","lessThan":"V3.1","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family","versions":[{"status":"unaffected","version":"0","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XCM-/XRM-/XCH-/XRH-300 family","versions":[{"status":"affected","version":"0","lessThan":"V3.1","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","versions":[{"status":"affected","version":"0","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-613116.html"}]}]},"dataVersion":"5.2"}