CVE-2026-43012: net/mlx5: Fix switchdev mode rollback in case of failure
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix switchdev mode rollback in case of failure
If for some internal reason switchdev mode fails, we rollback to legacy mode, before this patch, rollback will unregister the uplink netdev and leave it unregistered causing the below kernel bug.
To fix this, we need to avoid netdev unregister by setting the proper rollback flag 'MLX5PRIVFLAGSSWITCHLEGACY' to indicate legacy mode.
devlink (431) used greatest stack depth: 11048 bytes left mlx5core 0000:00:03.0: E-Switch: Disable: mode(LEGACY), nvfs(0), \ necvfs(0), active vports(0) mlx5core 0000:00:03.0: E-Switch: Supported tc chains and prios offload mlx5core 0000:00:03.0: Loading uplink representor for vport 65535 mlx5core 0000:00:03.0: mlx5cmdouterr:816:(pid 456): \ QUERYHCACAP(0x100) opmod(0x0) failed, \ status bad parameter(0x3), syndrome (0x3a3846), err(-22) mlx5core 0000:00:03.0 enp0s3np0 (unregistered): Unloading uplink \ representor for vport 65535 ------------[ cut here ]------------ kernel BUG at net/core/dev.c:12070! Oops: invalid opcode: 0000 [#1] SMP NOPTI CPU: 2 UID: 0 PID: 456 Comm: devlink Not tainted 6.16.0-rc3+ \ #9 PREEMPT(voluntary) RIP: 0010:unregisternetdevicemanynotify+0x123/0xae0 ... Call Trace: [ 90.923094] unregisternetdevicequeue+0xad/0xf0 [ 90.923323] unregisternetdev+0x1c/0x40 [ 90.923522] mlx5evportrepunload+0x61/0xc6 [ 90.923736] eswoffloadsenable+0x8e6/0x920 [ 90.923947] mlx5eswitchenablelocked+0x349/0x430 [ 90.924182] ? ismpsupported+0x57/0xb0 [ 90.924376] mlx5devlinkeswitchmodeset+0x167/0x350 [ 90.924628] devlinknleswitchsetdoit+0x6f/0xf0 [ 90.924862] genlfamilyrcvmsgdoit+0xe8/0x140 [ 90.925088] genlrcvmsg+0x18b/0x290 [ 90.925269] ? pfxdevlinknlpredoit+0x10/0x10 [ 90.925506] ? pfxdevlinknleswitchsetdoit+0x10/0x10 [ 90.925766] ? pfxdevlinknlpostdoit+0x10/0x10 [ 90.926001] ? pfxgenlrcvmsg+0x10/0x10 [ 90.926206] netlinkrcvskb+0x52/0x100 [ 90.926393] genlrcv+0x28/0x40 [ 90.926557] netlinkunicast+0x27d/0x3d0 [ 90.926749] netlinksendmsg+0x1f7/0x430 [ 90.926942] syssendto+0x213/0x220 [ 90.927127] ? sysrecvmsg+0x6a/0xd0 [ 90.927312] x64syssendto+0x24/0x30 [ 90.927504] dosyscall64+0x50/0x1c0 [ 90.927687] entrySYSCALL64afterhwframe+0x76/0x7e [ 90.927929] RIP: 0033:0x7f7d0363e047
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1061.64~22.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1063.71~22.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-fde-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1062.69~22.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1064.72~22.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-136.136~22.04.1 - Upgrade
Upgrade
ubuntu/linux-ibm-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1061.62~22.04.1 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-136.136.2~22.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1059.62~22.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1058.61~22.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-136.136~22.04.3 - Upgrade
Upgrade
ubuntu/linux-realtime-6.8to a version that resolves this vulnerability.Fixed in 6.8.1-1056.57~22.04.2 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.8.0-136.136 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.8.0-1061.64 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.8.0-1063.71 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 6.8.0-1062.69 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.8.0-1064.72 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 6.8.0-1059.67 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 6.8.0-1046.50 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 6.8.0-1061.62 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 6.8.0-136.136.2 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 6.8.0-1059.62 - Upgrade
Upgrade
ubuntu/linux-nvidia-lowlatencyto a version that resolves this vulnerability.Fixed in 6.8.0-1059.62.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegrato a version that resolves this vulnerability.Fixed in 6.8.0-1030.31 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.8.0-1058.61 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.8.0-1061.65 - Upgrade
Upgrade
ubuntu/linux-xilinxto a version that resolves this vulnerability.Fixed in 6.8.0-1033.34 - Upgrade
Upgrade
ubuntu/linux-bluefieldto a version that resolves this vulnerability.Fixed in 6.8.0-1028.33 - Upgrade
Upgrade
ubuntu/linux-raspi-realtimeto a version that resolves this vulnerability.Fixed in 6.8.0-2050.52 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.8.1-1056.57 - Upgrade
Upgrade
ubuntu/linux-aws-fipsto a version that resolves this vulnerability.Fixed in 6.8.0-1061.64+fips1 - Upgrade
Upgrade
ubuntu/linux-azure-fipsto a version that resolves this vulnerability.Fixed in 6.8.0-1063.71+fips2 - Upgrade
Upgrade
ubuntu/linux-fipsto a version that resolves this vulnerability.Fixed in 6.8.0-136.136+fips2 - Upgrade
Upgrade
ubuntu/linux-gcp-fipsto a version that resolves this vulnerability.Fixed in 6.8.0-1064.72+fips1 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 7.0.0-1006.6 - Configuration
Set the rollback flag MLX5_PRIV_FLAGS_SWITCH_LEGACY when switchdev mode fails, so rollback avoids unregistering the uplink netdev.
Linux kernel net/mlx5 switchdev rollback MLX5_PRIV_FLAGS_SWITCH_LEGACY = legacy mode
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43012?
CVE-2026-43012 has been classified with a medium severity due to its impact on mode rollback during switchdev failures.
How do I fix CVE-2026-43012?
To fix CVE-2026-43012, update the Linux kernel to the patched version that includes the rollback improvements for switchdev mode.
What systems are affected by CVE-2026-43012?
CVE-2026-43012 affects various versions of the Linux kernel that utilize the mlx5 network driver.
What type of vulnerability is CVE-2026-43012?
CVE-2026-43012 is a vulnerability involving improper handling of mode rollbacks in the switchdev feature of the Linux kernel.
Is there a workaround for CVE-2026-43012?
Currently, there are no specific workarounds for CVE-2026-43012; updating to a patched version of the kernel is the recommended action.