# CVE-2024-46857: net/mlx5: Fix bridge mode operations when there are no VFs

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-09-27T12:42:48.545Z
- **Modified:** 2026-06-17T07:56:05.670Z

## Who should check

- Anyone running Linux \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 52c4beb79e095e0631b5cac46ed48a2aefe51985; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 65feee671e37f3b6eda0b6af28f204b5bcf7fa50; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 505ae01f75f839b54329164bbfecf24cc1361b31; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< b1d305abef4640af1b4f1b4774d513cd81b10cfc
- Anyone running Linux 5.1

## Description

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.

## Affected and fixed versions

- Linux: \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 52c4beb79e095e0631b5cac46ed48a2aefe51985; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 65feee671e37f3b6eda0b6af28f204b5bcf7fa50; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 505ae01f75f839b54329164bbfecf24cc1361b31; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< b1d305abef4640af1b4f1b4774d513cd81b10cfc (cvelist)
- Linux: 5.1 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-46857. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46857.md
Affected: Linux >= 4b89251de024fb85329e4cbd8fbea551ae6c665c, < 52c4beb79e095e0631b5cac46ed48a2aefe51985; >= 4b89251de024fb85329e4cbd8fbea551ae6c665c, < 65feee671e37f3b6eda0b6af28f204b5bcf7fa50; >= 4b89251de024fb85329e4cbd8fbea551ae6c665c, < 505ae01f75f839b54329164bbfecf24cc1361b31; >= 4b89251de024fb85329e4cb…
Fixed in: Linux 52c4beb79e095e0631b5cac46ed48a2aefe51985, Linux 65feee671e37f3b6eda0b6af28f204b5bcf7fa50, Linux 505ae01f75f839b54329164bbfecf24cc1361b31

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-46857 being exploited?

There is no confirmed exploitation: CVE-2024-46857 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-46857?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-46857?

Linux \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 52c4beb79e095e0631b5cac46ed48a2aefe51985; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 65feee671e37f3b6eda0b6af28f204b5bcf7fa50; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< 505ae01f75f839b54329164bbfecf24cc1361b31; \>= 4b89251de024fb85329e4cbd8fbea551ae6c665c, \< b1d305abef4640af1b4f1b4774d513cd81b10cfc; Linux 5.1.

### Is there a fix for CVE-2024-46857?

Yes. Fixed in Linux 52c4beb79e095e0631b5cac46ed48a2aefe51985, Linux 65feee671e37f3b6eda0b6af28f204b5bcf7fa50, Linux 505ae01f75f839b54329164bbfecf24cc1361b31. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-46857?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/52c4beb79e095e0631b5cac46ed48a2aefe51985>
- patch: <https://git.kernel.org/stable/c/65feee671e37f3b6eda0b6af28f204b5bcf7fa50>
- patch: <https://git.kernel.org/stable/c/505ae01f75f839b54329164bbfecf24cc1361b31>
- patch: <https://git.kernel.org/stable/c/b1d305abef4640af1b4f1b4774d513cd81b10cfc>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-46857>

HTML: <https://flawdb.com/CVE-2024-46857> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-46857>
