{"id":"CVE-2025-68813","aliases":["CVE-2025-68813"],"related":[],"kind":"vulnerability","state":"published","title":"ipvs: fix ipv4 null-ptr-deref in route error path","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nipvs: fix ipv4 null-ptr-deref in route error path\n\nThe IPv4 code path in __ip_vs_get_out_rt() calls dst_link_failure()\nwithout ensuring skb->dev is set, leading to a NULL pointer dereference\nin fib_compute_spec_dst() when ipv4_link_failure() attempts to send\nICMP destination unreachable messages.\n\nThe issue emerged after commit ed0de45a1008 (\"ipv4: recompile ip options\nin ipv4_link_failure\") started calling __ip_options_compile() from\nipv4_link_failure(). This code path eventually calls fib_compute_spec_dst()\nwhich dereferences skb->dev. An attempt was made to fix the NULL skb->dev\ndereference in commit 0113d9c9d1cc (\"ipv4: fix null-deref in\nipv4_link_failure\"), but it only addressed the immediate dev_net(skb->dev)\ndereference by using a fallback device. The fix was incomplete because\nfib_compute_spec_dst() later in the call chain still accesses skb->dev\ndirectly, which remains NULL when IPVS calls dst_link_failure().\n\nThe crash occurs when:\n1. IPVS processes a packet in NAT mode with a misconfigured destination\n2. Route lookup fails in __ip_vs_get_out_rt() before establishing a route\n3. The error path calls dst_link_failure(skb) with skb->dev == NULL\n4. ipv4_link_failure() → ipv4_send_dest_unreach() →\n   __ip_options_compile() → fib_compute_spec_dst()\n5. fib_compute_spec_dst() dereferences NULL skb->dev\n\nApply the same fix used for IPv6 in commit 326bf17ea5d4 (\"ipvs: fix\nipv6 route unreach panic\"): set skb->dev from skb_dst(skb)->dev before\ncalling dst_link_failure().\n\nKASAN: null-ptr-deref in range [0x0000000000000328-0x000000000000032f]\nCPU: 1 PID: 12732 Comm: syz.1.3469 Not tainted 6.6.114 #2\nRIP: 0010:__in_dev_get_rcu include/linux/inetdevice.h:233\nRIP: 0010:fib_compute_spec_dst+0x17a/0x9f0 net/ipv4/fib_frontend.c:285\nCall Trace:\n  <TASK>\n  spec_dst_fill net/ipv4/ip_options.c:232\n  spec_dst_fill net/ipv4/ip_options.c:229\n  __ip_options_compile+0x13a1/0x17d0 net/ipv4/ip_options.c:330\n  ipv4_send_dest_unreach net/ipv4/route.c:1252\n  ipv4_link_failure+0x702/0xb80 net/ipv4/route.c:1265\n  dst_link_failure include/net/dst.h:437\n  __ip_vs_get_out_rt+0x15fd/0x19e0 net/netfilter/ipvs/ip_vs_xmit.c:412\n  ip_vs_nat_xmit+0x1d8/0xc80 net/netfilter/ipvs/ip_vs_xmit.c:764","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nipvs: fix ipv4 null-ptr-deref in route error path\n\nThe IPv4 code path in __ip_vs_get_out_rt() calls dst_link_failure()\nwithout ensuring skb->dev is set, leading to a NULL pointer dereference\nin fib_compute_spec_dst() when ipv4_link_failure() attempts to send\nICMP destination unreachable messages.\n\nThe issue emerged after commit ed0de45a1008 (\"ipv4: recompile ip options\nin ipv4_link_failure\") started calling __ip_options_compile() from\nipv4_link_failure(). This code path eventually calls fib_compute_spec_dst()\nwhich dereferences skb->dev. An attempt was made to fix the NULL skb->dev\ndereference in commit 0113d9c9d1cc (\"ipv4: fix null-deref in\nipv4_link_failure\"), but it only addressed the immediate dev_net(skb->dev)\ndereference by using a fallback device. The fix was incomplete because\nfib_compute_spec_dst() later in the call chain still accesses skb->dev\ndirectly, which remains NULL when IPVS calls dst_link_failure().\n\nThe crash occurs when:\n1. IPVS processes a packet in NAT mode with a misconfigured destination\n2. Route lookup fails in __ip_vs_get_out_rt() before establishing a route\n3. The error path calls dst_link_failure(skb) with skb->dev == NULL\n4. ipv4_link_failure() → ipv4_send_dest_unreach() →\n   __ip_options_compile() → fib_compute_spec_dst()\n5. fib_compute_spec_dst() dereferences NULL skb->dev\n\nApply the same fix used for IPv6 in commit 326bf17ea5d4 (\"ipvs: fix\nipv6 route unreach panic\"): set skb->dev from skb_dst(skb)->dev before\ncalling dst_link_failure().\n\nKASAN: null-ptr-deref in range [0x0000000000000328-0x000000000000032f]\nCPU: 1 PID: 12732 Comm: syz.1.3469 Not tainted 6.6.114 #2\nRIP: 0010:__in_dev_get_rcu include/linux/inetdevice.h:233\nRIP: 0010:fib_compute_spec_dst+0x17a/0x9f0 net/ipv4/fib_frontend.c:285\nCall Trace:\n  <TASK>\n  spec_dst_fill net/ipv4/ip_options.c:232\n  spec_dst_fill net/ipv4/ip_options.c:229\n  __ip_options_compile+0x13a1/0x17d0 net/ipv4/ip_options.c:330\n  ipv4_send_dest_unreach net/ipv4/route.c:1252\n  ipv4_link_failure+0x702/0xb80 net/ipv4/route.c:1265\n  dst_link_failure include/net/dst.h:437\n  __ip_vs_get_out_rt+0x15fd/0x19e0 net/netfilter/ipvs/ip_vs_xmit.c:412\n  ip_vs_nat_xmit+0x1d8/0xc80 net/netfilter/ipvs/ip_vs_xmit.c:764","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nipvs: corrección de desreferencia de puntero nulo ipv4 en la ruta de error de enrutamiento\n\nLa ruta de código IPv4 en __ip_vs_get_out_rt() llama a dst_link_failure() sin asegurar que skb-&gt;dev esté configurado, lo que lleva a una desreferencia de puntero NULO en fib_compute_spec_dst() cuando ipv4_link_failure() intenta enviar mensajes ICMP de destino inalcanzable.\n\nEl problema surgió después de que el commit ed0de45a1008 ('ipv4: recompilar opciones ip en ipv4_link_failure') comenzó a llamar a __ip_options_compile() desde ipv4_link_failure(). Esta ruta de código finalmente llama a fib_compute_spec_dst() que desreferencia skb-&gt;dev. Se intentó corregir la desreferencia de skb-&gt;dev NULO en el commit 0113d9c9d1cc ('ipv4: corregir desreferencia nula en ipv4_link_failure'), pero solo abordó la desreferencia inmediata de dev_net(skb-&gt;dev) mediante el uso de un dispositivo de respaldo. La corrección fue incompleta porque fib_compute_spec_dst() más adelante en la cadena de llamadas todavía accede a skb-&gt;dev directamente, que permanece NULO cuando IPVS llama a dst_link_failure().\n\nEl fallo ocurre cuando:\n1. IPVS procesa un paquete en modo NAT con un destino mal configurado\n2. La búsqueda de ruta falla en __ip_vs_get_out_rt() antes de establecer una ruta\n3. La ruta de error llama a dst_link_failure(skb) con skb-&gt;dev == NULO\n4. ipv4_link_failure() ? ipv4_send_dest_unreach() ? __ip_options_compile() ? fib_compute_spec_dst()\n5. fib_compute_spec_dst() desreferencia skb-&gt;dev NULO\n\nAplicar la misma corrección utilizada para IPv6 en el commit 326bf17ea5d4 ('ipvs: corregir pánico por ruta inalcanzable ipv6'): establecer skb-&gt;dev desde skb_dst(skb)-&gt;dev antes de llamar a dst_link_failure().\n\nKASAN: desreferencia de puntero nulo en el rango [0x0000000000000328-0x000000000000032f]\nCPU: 1 PID: 12732 Comm: syz.1.3469 No contaminado 6.6.114 #2\nRIP: 0010:__in_dev_get_rcu include/linux/inetdevice.h:233\nRIP: 0010:fib_compute_spec_dst+0x17a/0x9f0 net/ipv4/fib_frontend.c:285\nRastro de Llamada:\n  \n  spec_dst_fill net/ipv4/ip_options.c:232\n  spec_dst_fill net/ipv4/ip_options.c:229\n  __ip_options_compile+0x13a1/0x17d0 net/ipv4/ip_options.c:330\n  ipv4_send_dest_unreach net/ipv4/route.c:1252\n  ipv4_link_failure+0x702/0xb80 net/ipv4/route.c:1265\n  dst_link_failure include/net/dst.h:437\n  __ip_vs_get_out_rt+0x15fd/0x19e0 net/netfilter/ipvs/ip_vs_xmit.c:412\n  ip_vs_nat_xmit+0x1d8/0xc80 net/netfilter/ipvs/ip_vs_xmit.c:764","source":"nvd"}],"published":"2026-01-13T15:29:18.483Z","modified":"2026-10-19T19:17:06.470Z","severities":[],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"dd72a93c80408f06327dd2d956eb1a656d0b5903","status":"affected"},{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"312d7cd88882fc6cadcc08b02287497aaaf94bcd","status":"affected"},{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"cdeff10851c37a002d87a035818ebd60fdb74447","status":"affected"},{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"4729ff0581fbb7ad098b6153b76b6f5aac94618a","status":"affected"},{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"25ab24df31f7af843c96a38e0781b9165216e1a8","status":"affected"},{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"689a627d14788ad772e0fa24c2e57a23dbc7ce90","status":"affected"},{"type":"git","introduced":"ed0de45a1008991fdaa27a0152befcb74d126a8b","fixed":"ad891bb3d079a46a821bf2b8867854645191bab0","status":"affected"},{"type":"git","version":"6c2fa855d8178699706b1192db2f1f8102b0ba1e","status":"affected"},{"type":"git","version":"fbf569d2beee2a4a7a0bc8b619c26101d1211a88","status":"affected"},{"type":"git","version":"ff71f99d5fb2daf54340e8b290d0bc4e6b4c1d38","status":"affected"},{"type":"git","version":"3d988fcddbe7b8673a231958bd2fba61b5a7ced9","status":"affected"},{"type":"git","version":"8a430e56a6485267a1b2d3747209d26c54d1a34b","status":"affected"},{"type":"git","version":"6bd1ee0a993fc9574ae43c1994c54a60cb23a380","status":"affected"},{"type":"semver","introduced":"3.18.139","fixed":"3.19","status":"affected"},{"type":"semver","introduced":"4.4.179","fixed":"4.5","status":"affected"},{"type":"semver","introduced":"4.9.171","fixed":"4.10","status":"affected"},{"type":"semver","introduced":"4.14.114","fixed":"4.15","status":"affected"},{"type":"semver","introduced":"4.19.37","fixed":"4.20","status":"affected"},{"type":"semver","introduced":"5.0.10","fixed":"5.1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.1","status":"unaffected"},{"type":"semver","introduced":"5.10.248","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.198","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.160","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.120","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.64","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.3","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/dd72a93c80408f06327dd2d956eb1a656d0b5903","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/312d7cd88882fc6cadcc08b02287497aaaf94bcd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cdeff10851c37a002d87a035818ebd60fdb74447","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4729ff0581fbb7ad098b6153b76b6f5aac94618a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/25ab24df31f7af843c96a38e0781b9165216e1a8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/689a627d14788ad772e0fa24c2e57a23dbc7ce90","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ad891bb3d079a46a821bf2b8867854645191bab0","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-06-16T19:15:40.029Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68813","url":"https://www.cve.org/CVERecord?id=CVE-2025-68813","licence":"CVE Terms of Use","modified":"2026-10-19T18:05:08.415Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68813","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68813","licence":"Public domain","modified":"2026-10-19T19:17:06.470Z"}],"updatedAt":"2026-11-25T22:59:10.543Z","epss":{"score":0.00207,"percentile":0.11476,"date":"2026-12-01T12:00:22.000Z"}}