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 'MLX5_PRIV_FLAGS_SWITCH_LEGACY' to indicate legacy mode. devlink (431) used greatest stack depth: 11048 bytes left mlx5_core 0000:00:03.0: E-Switch: Disable: mode(LEGACY), nvfs(0), \ necvfs(0), active vports(0) mlx5_core 0000:00:03.0: E-Switch: Supported tc chains and prios offload mlx5_core 0000:00:03.0: Loading uplink representor for vport 65535 mlx5_core 0000:00:03.0: mlx5_cmd_out_err:816:(pid 456): \ QUERY_HCA_CAP(0x100) op_mod(0x0) failed, \ status bad parameter(0x3), syndrome (0x3a3846), err(-22) mlx5_core 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:unregister_netdevice_many_notify+0x123/0xae0 ... Call Trace: [ 90.923094] unregister_netdevice_queue+0xad/0xf0 [ 90.923323] unregister_netdev+0x1c/0x40 [ 90.923522] mlx5e_vport_rep_unload+0x61/0xc6 [ 90.923736] esw_offloads_enable+0x8e6/0x920 [ 90.923947] mlx5_eswitch_enable_locke
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.81, 6.18.22, 6.19.12
- CVEs
- CVE-2026-43012
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 02:53 UTC · Revision 1
Source evidence
net/mlx5: Fix switchdev mode rollback in case of failure
core-osv · Original sourcePublished 1 May 2026, 14:15 UTC
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 'MLX5_PRIV_FLAGS_SWITCH_LEGACY' to indicate legacy mode. devlink (431) used greatest stack depth: 11048 bytes left mlx5_core 0000:00:03.0: E-Switch: Disable: mode(LEGACY), nvfs(0), \ necvfs(0), active vports(0) mlx5_core 0000:00:03.0: E-Switch: Supported tc chains and prios offload mlx5_core 0000:00:03.0: Loading uplink representor for vport 65535 mlx5_core 0000:00:03.0: mlx5_cmd_out_err:816:(pid 456): \ QUERY_HCA_CAP(0x100) op_mod(0x0) failed, \ status bad parameter(0x3), syndrome (0x3a3846), err(-22) mlx5_core 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:unregister_netdevice_many_notify+0x123/0xae0 ... Call Trace: [ 90.923094] unregister_netdevice_queue+0xad/0xf0 [ 90.923323] unregister_netdev+0x1c/0x40 [ 90.923522] mlx5e_vport_rep_unload+0x61/0xc6 [ 90.923736] esw_offloads_enable+0x8e6/0x920 [ 90.923947] mlx5_eswitch_enable_locke
osv:CVE-2026-43012
Kernel
Fixed versions: 6.12.81, 6.18.22, 6.19.12
Complete source record
{
"id": "d7c780474ea18b7c991020c503adae2987356c444d9215099fda00f75abd8804",
"url": "https://osv.dev/vulnerability/CVE-2026-43012",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "net/mlx5: Fix switchdev mode rollback in case of failure",
"summary": "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 'MLX5_PRIV_FLAGS_SWITCH_LEGACY' to indicate legacy mode. devlink (431) used greatest stack depth: 11048 bytes left mlx5_core 0000:00:03.0: E-Switch: Disable: mode(LEGACY), nvfs(0), \\ necvfs(0), active vports(0) mlx5_core 0000:00:03.0: E-Switch: Supported tc chains and prios offload mlx5_core 0000:00:03.0: Loading uplink representor for vport 65535 mlx5_core 0000:00:03.0: mlx5_cmd_out_err:816:(pid 456): \\ QUERY_HCA_CAP(0x100) op_mod(0x0) failed, \\ status bad parameter(0x3), syndrome (0x3a3846), err(-22) mlx5_core 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:unregister_netdevice_many_notify+0x123/0xae0 ... Call Trace: [ 90.923094] unregister_netdevice_queue+0xad/0xf0 [ 90.923323] unregister_netdev+0x1c/0x40 [ 90.923522] mlx5e_vport_rep_unload+0x61/0xc6 [ 90.923736] esw_offloads_enable+0x8e6/0x920 [ 90.923947] mlx5_eswitch_enable_locke",
"evidence": "osv:CVE-2026-43012",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.81",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.22",
"evidence": "/affected/1/ranges"
},
{
"value": "6.19.12",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-43012",
"aliases": [
"CVE-2026-43012"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "de85624c623dbb5fdb3ae7b08b66894a072c0cc0"
},
{
"fixed": "2ebb13f3e8be0b61f72425b34cce60c8b6ad1891"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "2a4f56fbcc473d8faeb29b73082df39efbe5893c"
},
{
"fixed": "e27153b2bd6e6699b544ac4dfa35d167bed5e642"
},
{
"fixed": "4363698838b7ec6e8d85b179495889aa7e522f91"
},
{
"fixed": "403186400a1a6166efe7031edc549c15fee4723f"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.12.9"
},
{
"fixed": "6.12.81"
}
]
}
],
"versions": [
"v6.12.80",
"v6.12.79",
"v6.12.78",
"v6.12.77",
"v6.12.76",
"v6.12.75",
"v6.12.74",
"v6.12.73",
"v6.12.72",
"v6.12.71",
"v6.12.70",
"v6.12.69",
"v6.12.68",
"v6.12.67",
"v6.12.66",
"v6.12.65",
"v6.12.64",
"v6.12.63",
"v6.12.62",
"v6.12.61",
"v6.12.60",
"v6.12.59",
"v6.12.58",
"v6.12.57",
"v6.12.56",
"v6.12.55",
"v6.12.54",
"v6.12.53",
"v6.12.52",
"v6.12.51",
"v6.12.50",
"v6.12.49",
"v6.12.48",
"v6.12.47",
"v6.12.46",
"v6.12.45",
"v6.12.44",
"v6.12.43",
"v6.12.42",
"v6.12.41",
"v6.12.40",
"v6.12.39",
"v6.12.38",
"v6.12.37",
"v6.12.36",
"v6.12.35",
"v6.12.34",
"v6.12.33",
"v6.12.32",
"v6.12.31",
"v6.12.30",
"v6.12.29",
"v6.12.28",
"v6.12.27",
"v6.12.26",
"v6.12.25",
"v6.12.24",
"v6.12.23",
"v6.12.22",
"v6.12.21",
"v6.12.20",
"v6.12.19",
"v6.12.18",
"v6.12.17",
"v6.12.16",
"v6.12.15",
"v6.12.14",
"v6.12.13",
"v6.12.12",
"v6.12.11",
"v6.12.10",
"v6.12.9"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-43012.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "6.12.81"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.22"
},
{
"fixed": "6.19.12"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-43012.json"
}
}
],
"modified": "2026-10-28T02:30:33.038835900Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2ebb13f3e8be0b61f72425b34cce60c8b6ad1891",
"https://git.kernel.org/stable/c/403186400a1a6166efe7031edc549c15fee4723f",
"https://git.kernel.org/stable/c/4363698838b7ec6e8d85b179495889aa7e522f91",
"https://git.kernel.org/stable/c/e27153b2bd6e6699b544ac4dfa35d167bed5e642",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43012.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-43012",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43012.json"
}
},
"related_cves": [
{
"value": "CVE-2026-43012",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 499803,
"published_at": "2026-05-01T14:15:18.256+00:00"
}