Vulnerability · Published May 20, 2024 · Assigned by Linux
CVE-2024-35959net/mlx5e: Fix mlx5e_priv_init() cleanup flow
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.
Official description
In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Fix mlx5e_priv_init() cleanup flow When mlx5e_priv_init() fails, the cleanup flow calls mlx5e_selq_cleanup which calls mlx5e_selq_apply() that assures that the `priv->state_lock` is held using lockdep_is_held(). Acquire the state_lock in mlx5e_selq_cleanup(). Kernel log: ============================= WARNING: suspicious RCU usage 6.8.0-rc3_net_next_841a9b5 #1 Not tainted ----------------------------- drivers/net/ethernet/mellanox/mlx5/core/en/selq.c:124 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by systemd-modules/293: #0: ffffffffa05067b0 (devices_rwsem){++++}-{3:3}, at: ib_register_client+0x109/0x1b0 [ib_core] #1: ffff8881096c65c0 (&device->client_data_rwsem){++++}-{3:3}, at: add_client_context+0x104/0x1c0 [ib_core] stack backtrace: CPU: 4 PID: 293 Comm: systemd-modules Not tainted 6.8.0-rc3_net_next_841a9b5 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x8a/0xa0 lockdep_rcu_suspicious+0x154/0x1a0 mlx5e_selq_apply+0x94/0xa0 [mlx5_core] mlx5e_selq_cleanup+0x3a/0x60 [mlx5_core] mlx5e_priv_init+0x2be/0x2f0 [mlx5_core] mlx5_rdma_setup_rn+0x7c/0x1a0 [mlx5_core] rdma_init_netdev+0x4e/0x80 [ib_core] ? mlx5_rdma_netdev_free+0x70/0x70 [mlx5_core] ipoib_intf_init+0x64/0x550 [ib_ipoib] ipoib_intf_alloc+0x4e/0xc0 [ib_ipoib] ipoib_add_one+0xb0/0x360 [ib_ipoib] add_client_context+0x112/0x1c0 [ib_core] ib_register_client+0x166/0x1b0 [ib_core] ? 0xffffffffa0573000 ipoib_init_module+0xeb/0x1a0 [ib_ipoib] do_one_initcall+0x61/0x250 do_init_module+0x8a/0x270 init_module_from_file+0x8b/0xd0 idempotent_init_module+0x17d/0x230 __x64_sys_finit_module+0x61/0xb0 do_syscall_64+0x71/0x140 entry_SYSCALL_64_after_hwframe+0x46/0x4e </TASK>
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.90-1 | DEBIAN-CVE-2024-35959 |
| Debian:13 | linux | 6.8.9-1 | DEBIAN-CVE-2024-35959 |
| Debian:14 | linux | 6.8.9-1 | DEBIAN-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux | 6.8.0-38.38 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1011.12 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1011.12~22.04.1 | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1010.10 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1010.11 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1006.9 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1008.8 | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-intel | 6.8.0-1007.14 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-38.38.1 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1009.9 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1009.9~22.04.1 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1008.8 | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1008.8 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1008.8~22.04.1 | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1007.7 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-38.38.1 | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-35959 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-35959 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 8bf30be75069d6080659de9a28565c048f6cef9b – before ad26f26abd353113dea4e8d5ebadccdab9b61e768bf30be75069d6080659de9a28565c048f6cef9b – before f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f38bf30be75069d6080659de9a28565c048f6cef9b – before 6bd77865fda662913dcb5722a66a773840370aa78bf30be75069d6080659de9a28565c048f6cef9b – before ecb829459a841198e142f72fadab56424ae96519 |
| Linux | Linux | 5.18 |