CVE-2024-46857: net/mlx5: Fix bridge mode operations when there are no VFs
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix bridge mode operations when there are no VFs
Currently, trying to set the bridge mode attribute when numvfs=0 leads to a
crash:
bridge link set dev eth2 hwmode vepa
[ 168.967392] BUG: kernel NULL pointer dereference, address: 0000000000000030
[...]
[ 168.969989] RIP: 0010:mlx5_add_flow_rules+0x1f/0x300 [mlx5_core]
[...]
[ 168.976037] Call Trace:
[ 168.976188] <TASK>
[ 168.978620] _mlx5_eswitch_set_vepa_locked+0x113/0x230 [mlx5_core]
[ 168.979074] mlx5_eswitch_set_vepa+0x7f/0xa0 [mlx5_core]
[ 168.979471] rtnl_bridge_setlink+0xe9/0x1f0
[ 168.979714] rtnetlink_rcv_msg+0x159/0x400
[ 168.980451] netlink_rcv_skb+0x54/0x100
[ 168.980675] netlink_unicast+0x241/0x360
[ 168.980918] netlink_sendmsg+0x1f6/0x430
[ 168.981162] ____sys_sendmsg+0x3bb/0x3f0
[ 168.982155] ___sys_sendmsg+0x88/0xd0
[ 168.985036] __sys_sendmsg+0x59/0xa0
[ 168.985477] do_syscall_64+0x79/0x150
[ 168.987273] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 168.987773] RIP: 0033:0x7f8f7950f917
(esw->fdb_table.legacy.vepa_fdb is null)
The bridge mode is only relevant when there are multiple functions per
port. Therefore, prevent setting and getting this setting when there are no
VFs.
Note that after this change, there are no settings to change on the PF
interface using `bridge link` when there are no VFs, so the interface no
longer appears in the `bridge link` output.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel crash bug in the mlx5 network driver. On systems with Mellanox/NVIDIA mlx5 hardware, changing bridge mode when no virtual functions exist can trigger a null pointer dereference. The main business risk is local denial of service on affected hosts, not confirmed remote compromise.
Executive priority
Treat as routine-to-priority patching for affected infrastructure. Escalate if mlx5-equipped virtualization, cloud, or network hosts rely on automation that modifies bridge settings, because an accidental crash could affect service availability.
Technical view
The mlx5 eswitch bridge-mode path can reference esw->fdb_table.legacy.vepa_fdb when it is null if numvfs is zero. The upstream fix blocks bridge-mode get and set operations when no VFs exist, because the setting is only meaningful with multiple functions per port.
Likely exposure
Exposure appears limited to Linux systems using the mlx5 driver with SR-IOV capable hardware, especially PF interfaces with zero VFs configured. Systems without mlx5 hardware or without bridge-mode management paths are unlikely to be affected based on the provided sources.
Exploitation context
The bundle does not show CISA KEV listing or active exploitation. The described trigger is local administrative network configuration, so practical abuse likely requires local privileges or automation already authorized to change bridge link settings.
Researcher notes
The CVE data lacks CVSS, CWE, and detailed affected package mappings. The strongest evidence is the upstream kernel fix description and stable commit references. Avoid broad claims beyond mlx5 bridge-mode operations with no VFs.
Mitigation direction
Apply kernel updates containing the referenced stable mlx5 fixes.
Use vendor distribution kernel advisories for exact package versions.
Avoid mlx5 bridge-mode changes when numvfs is zero until patched.
Review Debian LTS guidance if running affected Debian LTS kernels.
Validation and detection
Inventory Linux hosts using mlx5_core or mlx5 hardware.
Check whether PF interfaces have numvfs set to zero.
Confirm installed kernels include the referenced stable fixes.
Review kernel logs for mlx5 NULL pointer dereference crashes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-46857 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.