In the Linux kernel, the following vulnerability has been resolved:
mlxsw: spectrumacltcam: Fix incorrect list API usage
Both the function that migrates all the chunks within a region and the function that migrates all the entries within a chunk call listfirstentry() on the respective lists without checking that the lists are not empty. This is incorrect usage of the API, which leads to the following warning [1].
Fix by returning if the lists are empty as there is nothing to migrate in this case.
[1] WARNING: CPU: 0 PID: 6437 at drivers/net/ethernet/mellanox/mlxsw/spectrumacltcam.c:1266 mlxswspacltcamvchunkmigrateall+0x1f1/0> Modules linked in: CPU: 0 PID: 6437 Comm: kworker/0:37 Not tainted 6.9.0-rc3-custom-00883-g94a65f079ef6 #39 Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019 Workqueue: mlxswcore mlxswspacltcamvregionrehashwork RIP: 0010:mlxswspacltcamvchunkmigrateall+0x1f1/0x2c0 [...] Call Trace: <TASK> mlxswspacltcamvregionrehashwork+0x6c/0x4a0 processonework+0x151/0x370 workerthread+0x2cb/0x3e0 kthread+0xd0/0x100 retfromfork+0x34/0x50 retfromfork_asm+0x1a/0x30 </TASK>
[
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
},
"digest": {
"line_hashes": [
"266701726062931707600920321291648377597",
"319813644992985328276142927797396151110",
"184727648966423157375017076046740048885",
"53241514914562481088079171658505525287",
"50144785199533823701913579837799767435",
"8448833410477176770079788667022334943",
"255478268756666418745501519921899376514",
"118280235873018681871181787694709702098",
"148759961442452392781788819607880443844"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b2c13b670b168e324e1cf109e67056a20fd610a",
"signature_version": "v1",
"id": "CVE-2024-36006-1b785802"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_one"
},
"digest": {
"length": 973.0,
"function_hash": "33927932018768144758281847129298769679"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af8b593c3dd9df82cb199be65863af004b09fd97",
"signature_version": "v1",
"id": "CVE-2024-36006-2b555bd4"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
},
"digest": {
"line_hashes": [
"266701726062931707600920321291648377597",
"319813644992985328276142927797396151110",
"184727648966423157375017076046740048885",
"53241514914562481088079171658505525287",
"50144785199533823701913579837799767435",
"8448833410477176770079788667022334943",
"255478268756666418745501519921899376514",
"118280235873018681871181787694709702098",
"148759961442452392781788819607880443844"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4526a56e02da3725db979358964df9cd9c567154",
"signature_version": "v1",
"id": "CVE-2024-36006-4636713b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_all"
},
"digest": {
"length": 443.0,
"function_hash": "11095039079804733131525328403621867498"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64435b64e43d8ee60faa46c0cd04e323e8b2a7b0",
"signature_version": "v1",
"id": "CVE-2024-36006-671d177f"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_one"
},
"digest": {
"length": 973.0,
"function_hash": "33927932018768144758281847129298769679"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64435b64e43d8ee60faa46c0cd04e323e8b2a7b0",
"signature_version": "v1",
"id": "CVE-2024-36006-678c998e"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
},
"digest": {
"line_hashes": [
"266701726062931707600920321291648377597",
"319813644992985328276142927797396151110",
"184727648966423157375017076046740048885",
"53241514914562481088079171658505525287",
"50144785199533823701913579837799767435",
"8448833410477176770079788667022334943",
"255478268756666418745501519921899376514",
"118280235873018681871181787694709702098",
"148759961442452392781788819607880443844"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64435b64e43d8ee60faa46c0cd04e323e8b2a7b0",
"signature_version": "v1",
"id": "CVE-2024-36006-6b67dd08"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_one"
},
"digest": {
"length": 973.0,
"function_hash": "33927932018768144758281847129298769679"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b2c13b670b168e324e1cf109e67056a20fd610a",
"signature_version": "v1",
"id": "CVE-2024-36006-775ec75d"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
},
"digest": {
"line_hashes": [
"266701726062931707600920321291648377597",
"319813644992985328276142927797396151110",
"184727648966423157375017076046740048885",
"53241514914562481088079171658505525287",
"50144785199533823701913579837799767435",
"8448833410477176770079788667022334943",
"255478268756666418745501519921899376514",
"118280235873018681871181787694709702098",
"148759961442452392781788819607880443844"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab4ecfb627338e440ae11def004c524a00d93e40",
"signature_version": "v1",
"id": "CVE-2024-36006-7aa10c12"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_all"
},
"digest": {
"length": 443.0,
"function_hash": "11095039079804733131525328403621867498"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b2c13b670b168e324e1cf109e67056a20fd610a",
"signature_version": "v1",
"id": "CVE-2024-36006-9209a928"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_one"
},
"digest": {
"length": 973.0,
"function_hash": "33927932018768144758281847129298769679"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b377add0f0117409c418ddd6504bd682ebe0bf79",
"signature_version": "v1",
"id": "CVE-2024-36006-9aa08963"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
},
"digest": {
"line_hashes": [
"266701726062931707600920321291648377597",
"319813644992985328276142927797396151110",
"184727648966423157375017076046740048885",
"53241514914562481088079171658505525287",
"50144785199533823701913579837799767435",
"8448833410477176770079788667022334943",
"255478268756666418745501519921899376514",
"118280235873018681871181787694709702098",
"148759961442452392781788819607880443844"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b377add0f0117409c418ddd6504bd682ebe0bf79",
"signature_version": "v1",
"id": "CVE-2024-36006-a831bdf5"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_all"
},
"digest": {
"length": 443.0,
"function_hash": "11095039079804733131525328403621867498"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab4ecfb627338e440ae11def004c524a00d93e40",
"signature_version": "v1",
"id": "CVE-2024-36006-b18ea1e5"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_one"
},
"digest": {
"length": 973.0,
"function_hash": "33927932018768144758281847129298769679"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab4ecfb627338e440ae11def004c524a00d93e40",
"signature_version": "v1",
"id": "CVE-2024-36006-b6ac26e2"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_all"
},
"digest": {
"length": 443.0,
"function_hash": "11095039079804733131525328403621867498"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4526a56e02da3725db979358964df9cd9c567154",
"signature_version": "v1",
"id": "CVE-2024-36006-c20ccf22"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_one"
},
"digest": {
"length": 973.0,
"function_hash": "33927932018768144758281847129298769679"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4526a56e02da3725db979358964df9cd9c567154",
"signature_version": "v1",
"id": "CVE-2024-36006-e045c028"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
},
"digest": {
"line_hashes": [
"266701726062931707600920321291648377597",
"319813644992985328276142927797396151110",
"184727648966423157375017076046740048885",
"53241514914562481088079171658505525287",
"50144785199533823701913579837799767435",
"8448833410477176770079788667022334943",
"255478268756666418745501519921899376514",
"118280235873018681871181787694709702098",
"148759961442452392781788819607880443844"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af8b593c3dd9df82cb199be65863af004b09fd97",
"signature_version": "v1",
"id": "CVE-2024-36006-e3c5a165"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_all"
},
"digest": {
"length": 443.0,
"function_hash": "11095039079804733131525328403621867498"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b377add0f0117409c418ddd6504bd682ebe0bf79",
"signature_version": "v1",
"id": "CVE-2024-36006-ef5bf5f6"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c",
"function": "mlxsw_sp_acl_tcam_vchunk_migrate_all"
},
"digest": {
"length": 443.0,
"function_hash": "11095039079804733131525328403621867498"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af8b593c3dd9df82cb199be65863af004b09fd97",
"signature_version": "v1",
"id": "CVE-2024-36006-ff4b60ee"
}
]