HIGH
net/mlx5e IPsec Atomic
CVE-2026-43199
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
KernelScan AI4.4MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Fix "scheduling while atomic" in IPsec MAC address query Fix a "scheduling while atomic" bug in mlx5e_ipsec_init_macs() by replacing mlx5_query_mac_address() with ether_addr_copy() to get the local MAC address directly from netdev->dev_addr. The issue occurs because mlx5_query_mac_address() queries the hardware which involves mlx5_cmd_exec() that can sleep, but it is called from the mlx5e_ipsec_handle_event workqueue which runs in atomic context. The MAC address is already available in netdev->dev_addr, so no need to query hardware. This avoids the sleeping call and resolves the bug. Call trace: BUG: scheduling while atomic: kworker/u112:2/69344/0x00000200 __schedule+0x7ab/0xa20 schedule+0x1c/0xb0 schedule_timeout+0x6e/0xf0 __wait_for_common+0x91/0x1b0 cmd_exec+0xa85/0xff0 [mlx5_core] mlx5_cmd_exec+0x1f/0x50 [mlx5_core] mlx5_query_nic_vport_mac_address+0x7b/0xd0 [mlx5_core] mlx5_query_mac_address+0x19/0x30 [mlx5_core] mlx5e_ipsec_init_macs+0xc1/0x720 [mlx5_core] mlx5e_ipsec_build_accel_xfrm_attrs+0x422/0x670 [mlx5_core] mlx5e_ipsec_handle_event+0x2b9/0x460 [mlx5_core] process_one_work+0x178/0x2e0 worker_thread+0x2ea/0x430
02KernelScan AI Analysis
Risk summary
Systems using Mellanox MLX5 network cards with IPsec offload are vulnerable to kernel panics when IPsec ESN update events occur. This affects VPN gateways and secure network appliances using MLX5 hardware. The vulnerability requires administrative privileges to trigger but can cause complete system unavailability.
Vulnerability analysis
The vulnerability occurs in mlx5e_ipsec_init_macs() where mlx5_query_mac_address() makes a sleeping hardware query call from atomic context within the IPsec event handler workqueue. This violates kernel locking rules and triggers a 'scheduling while atomic' panic. The fix eliminates the hardware query by using the already-cached MAC address from netdev->dev_addr, removing the sleeping call entirely. Attack surface is limited to local users with CAP_NET_ADMIN privileges who can configure IPsec on MLX5 interfaces.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.75 | e1407fb7c337 |
| 6.18 | 6.18.16 | 57957bc7f186 |
| 6.19 | 6.19.6 | 546de94e41e9 |
| mainline | 7.0 | 859380694f43 |