CVE-2025-68813: ipvs: fix ipv4 null-ptr-deref in route error path
In the Linux kernel, the following vulnerability has been resolved:
ipvs: fix ipv4 null-ptr-deref in route error path
The IPv4 code path in ipvsgetoutrt() calls dstlinkfailure() without ensuring skb->dev is set, leading to a NULL pointer dereference in fibcomputespecdst() when ipv4linkfailure() attempts to send ICMP destination unreachable messages.
The issue emerged after commit ed0de45a1008 ("ipv4: recompile ip options in ipv4linkfailure") started calling ipoptionscompile() from ipv4linkfailure(). This code path eventually calls fibcomputespecdst() which dereferences skb->dev. An attempt was made to fix the NULL skb->dev dereference in commit 0113d9c9d1cc ("ipv4: fix null-deref in ipv4linkfailure"), but it only addressed the immediate devnet(skb->dev) dereference by using a fallback device. The fix was incomplete because fibcomputespecdst() later in the call chain still accesses skb->dev directly, which remains NULL when IPVS calls dstlinkfailure().
The crash occurs when: 1. IPVS processes a packet in NAT mode with a misconfigured destination 2. Route lookup fails in ipvsgetoutrt() before establishing a route 3. The error path calls dstlinkfailure(skb) with skb->dev == NULL 4. ipv4linkfailure() → ipv4senddestunreach() → ipoptionscompile() → fibcomputespecdst() 5. fibcomputespecdst() dereferences NULL skb->dev
Apply the same fix used for IPv6 in commit 326bf17ea5d4 ("ipvs: fix ipv6 route unreach panic"): set skb->dev from skbdst(skb)->dev before calling dstlinkfailure().
KASAN: null-ptr-deref in range [0x0000000000000328-0x000000000000032f] CPU: 1 PID: 12732 Comm: syz.1.3469 Not tainted 6.6.114 #2 RIP: 0010:indevgetrcu include/linux/inetdevice.h:233 RIP: 0010:fibcomputespecdst+0x17a/0x9f0 net/ipv4/fibfrontend.c:285 Call Trace: <TASK> specdstfill net/ipv4/ipoptions.c:232 specdstfill net/ipv4/ipoptions.c:229 ipoptionscompile+0x13a1/0x17d0 net/ipv4/ipoptions.c:330 ipv4senddestunreach net/ipv4/route.c:1252 ipv4linkfailure+0x702/0xb80 net/ipv4/route.c:1265 dstlinkfailure include/net/dst.h:437 ipvsgetoutrt+0x15fd/0x19e0 net/netfilter/ipvs/ipvsxmit.c:412 ipvsnatxmit+0x1d8/0xc80 net/netfilter/ipvs/ipvsxmit.c:764
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 326bf17ea5d4
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68813?
CVE-2025-68813 has a moderate severity rating due to the potential for a NULL pointer dereference leading to a denial of service.
How do I fix CVE-2025-68813?
To resolve CVE-2025-68813, you should update your Linux kernel to the latest patched version that addresses this vulnerability.
What are the risks associated with CVE-2025-68813?
The primary risk associated with CVE-2025-68813 is system instability, resulting from a possible crash when handling certain IPv4 routing error paths.
Is my system affected by CVE-2025-68813?
If you are running an affected version of the Linux kernel that includes IP Virtual Server (ipvs) functionality, your system may be impacted by CVE-2025-68813.
What component of the Linux kernel does CVE-2025-68813 affect?
CVE-2025-68813 specifically affects the IP Virtual Server (ipvs) component of the Linux kernel, particularly in handling routing errors.