# CVE-2025-39851: vxlan: Fix NPD when refreshing an FDB entry with a nexthop object

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

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; 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:** Remote, no login needed
- **EPSS:** 0.58% (percentile 42, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-09-19T15:26:23.576Z
- **Modified:** 2026-10-30T13:18:10.547Z

## Who should check

- Anyone running Linux \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< b1113c7f6110e4c7f16bbaaabf355a8948873777; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 18e4b315e359fa0505eee318a0cb745240122e2f; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 4ff4f3104da6507e0f118c63c4560dfdeb59dce3; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 0e8630f24c14d9c655d19eabe2e52a9e9f713307; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 6ead38147ebb813f08be6ea8ef547a0e4c09559a
- Anyone running Linux 5.8

## Description

In the Linux kernel, the following vulnerability has been resolved:

vxlan: Fix NPD when refreshing an FDB entry with a nexthop object

VXLAN FDB entries can point to either a remote destination or an FDB
nexthop group. The latter is usually used in EVPN deployments where
learning is disabled.

However, when learning is enabled, an incoming packet might try to
refresh an FDB entry that points to an FDB nexthop group and therefore
does not have a remote. Such packets should be dropped, but they are
only dropped after dereferencing the non-existent remote, resulting in a
NPD \[1\] which can be reproduced using \[2\].

Fix by dropping such packets earlier. Remove the misleading comment from
first\_remote\_rcu().

\[1\]
BUG: kernel NULL pointer dereference, address: 0000000000000000
\[...\]
CPU: 13 UID: 0 PID: 361 Comm: mausezahn Not tainted 6.17.0-rc1-virtme-g9f6b606b6b37 \#1 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-4.fc41 04/01/2014
RIP: 0010:vxlan\_snoop+0x98/0x1e0
\[...\]
Call Trace:
 \<TASK\>
 vxlan\_encap\_bypass+0x209/0x240
 encap\_bypass\_if\_local+0xb1/0x100
 vxlan\_xmit\_one+0x1375/0x17e0
 vxlan\_xmit+0x6b4/0x15f0
 dev\_hard\_start\_xmit+0x5d/0x1c0
 \_\_dev\_queue\_xmit+0x246/0xfd0
 packet\_sendmsg+0x113a/0x1850
 \_\_sock\_sendmsg+0x38/0x70
 \_\_sys\_sendto+0x126/0x180
 \_\_x64\_sys\_sendto+0x24/0x30
 do\_syscall\_64+0xa4/0x260
 entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53

\[2\]
 \#!/bin/bash

 ip address add 192.0.2.1/32 dev lo
 ip address add 192.0.2.2/32 dev lo

 ip nexthop add id 1 via 192.0.2.3 fdb
 ip nexthop add id 10 group 1 fdb

 ip link add name vx0 up type vxlan id 10010 local 192.0.2.1 dstport 12345 localbypass
 ip link add name vx1 up type vxlan id 10020 local 192.0.2.2 dstport 54321 learning

 bridge fdb add 00:11:22:33:44:55 dev vx0 self static dst 192.0.2.2 port 54321 vni 10020
 bridge fdb add 00:aa:bb:cc:dd:ee dev vx1 self static nhid 10

 mausezahn vx0 -a 00:aa:bb:cc:dd:ee -b 00:11:22:33:44:55 -c 1 -q

## Affected and fixed versions

- Linux: \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< b1113c7f6110e4c7f16bbaaabf355a8948873777; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 18e4b315e359fa0505eee318a0cb745240122e2f; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 4ff4f3104da6507e0f118c63c4560dfdeb59dce3; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 0e8630f24c14d9c655d19eabe2e52a9e9f713307; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 6ead38147ebb813f08be6ea8ef547a0e4c09559a (cvelist)
- Linux: 5.8 (cvelist)

## Mitigation

- Upgrade Linux to 6ead38147ebb813f08be6ea8ef547a0e4c09559a or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39851.md
Affected: Linux >= 1274e1cc42264d4e629841e4f182795cb0becfd2, < b1113c7f6110e4c7f16bbaaabf355a8948873777; >= 1274e1cc42264d4e629841e4f182795cb0becfd2, < 18e4b315e359fa0505eee318a0cb745240122e2f; >= 1274e1cc42264d4e629841e4f182795cb0becfd2, < 4ff4f3104da6507e0f118c63c4560dfdeb59dce3; >= 1274e1cc42264d4e629841e…
Fixed in: Linux 18e4b315e359fa0505eee318a0cb745240122e2f, Linux 4ff4f3104da6507e0f118c63c4560dfdeb59dce3, Linux 0e8630f24c14d9c655d19eabe2e52a9e9f713307, Linux 6ead38147ebb813f08be6ea8ef547a0e4c09559a

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-2025-39851 being exploited?

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

### How serious is CVE-2025-39851?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-39851?

Linux \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< b1113c7f6110e4c7f16bbaaabf355a8948873777; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 18e4b315e359fa0505eee318a0cb745240122e2f; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 4ff4f3104da6507e0f118c63c4560dfdeb59dce3; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 0e8630f24c14d9c655d19eabe2e52a9e9f713307; \>= 1274e1cc42264d4e629841e4f182795cb0becfd2, \< 6ead38147ebb813f08be6ea8ef547a0e4c09559a; Linux 5.8.

### Is there a fix for CVE-2025-39851?

Yes. Fixed in Linux 18e4b315e359fa0505eee318a0cb745240122e2f, Linux 4ff4f3104da6507e0f118c63c4560dfdeb59dce3, Linux 0e8630f24c14d9c655d19eabe2e52a9e9f713307, Linux 6ead38147ebb813f08be6ea8ef547a0e4c09559a. Upgrade Linux to 6ead38147ebb813f08be6ea8ef547a0e4c09559a or later.

### How do I check if I'm affected by CVE-2025-39851?

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/4ff4f3104da6507e0f118c63c4560dfdeb59dce3>
- patch: <https://git.kernel.org/stable/c/0e8630f24c14d9c655d19eabe2e52a9e9f713307>
- patch: <https://git.kernel.org/stable/c/6ead38147ebb813f08be6ea8ef547a0e4c09559a>
- other: <https://git.kernel.org/stable/c/b1113c7f6110e4c7f16bbaaabf355a8948873777>
- other: <https://git.kernel.org/stable/c/18e4b315e359fa0505eee318a0cb745240122e2f>

## 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-2025-39851>

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