We pointed VIDOC at the Linux kernel. Here’s what it found

We pointed the VIDOC security scanner at Linux v6.12 and earned credit for three CVEs. One of them lets a malformed SIP packet crash a Linux gateway by making the kernel copy nearly 2^64 bytes.

Nov 23, 2026 | 7 min read

In 2026, nobody is surprised that AI-powered scanners find bugs in production software. We wanted to challenge VIDOC to see if it could find valid bugs in the Linux kernel. In March, we pointed the VIDOC security scanner at Linux v6.12. Our reports earned us credit for three CVEs. We also reported six other bugs that other researchers had reported first.

Below, we walk through one bug in detail. The remaining bugs are listed at the end, with links to fixes and CVE advisories.

CVE-2026-52986 — nf_conntrack_sip: don't use simple_strtoul

Unauthenticated traffic can crash an unpatched Linux gateway with the SIP helper attached and SIP NAT rewriting active. SIP is the signalling protocol used for VoIP calls. Malformed traffic can make the kernel try to copy nearly 2^64 bytes of memory, eighteen billion gigabytes. A resulting panic takes every connection through the gateway down.

CVE-2026-52986

upstream fix

Why we need nf_conntrack_sip

A SIP message is plain text, much like HTTP. This one sets up a call from Alice to Bob:

1INVITE sip:bob@203.0.113.50 SIP/2.0 2Via: SIP/2.0/UDP 192.168.1.10:5060 3From: <sip:alice@192.168.1.10> 4To: <sip:bob@203.0.113.50>

It leaves Alice's phone inside a UDP datagram, inside an IP packet:

IP packet containing UDP and SIPIP packet containing UDP and SIP

Alice's address appears in the IP header and again in the SIP text, including Via:. 192.168.1.10 is private and means nothing outside her own network, so her router performs NAT, Network Address Translation, swapping it for the public 203.0.113.9. NAT works on the IP header and stops there:

on Alice's LANforwarded to Bob
IP header, src192.168.1.10203.0.113.9, rewritten by NAT
SIP text, Via:192.168.1.10:5060192.168.1.10:5060, untouched

This is an oversimplification of SIP NAT, leaving out Via's received handling, but it is all we need for this blogpost. In this simplified example, Bob replies to the address he reads in Via:, 192.168.1.10. That is a private address on Alice's network, not on Bob's, so his response never reaches her and the call fails.

The fix for that is an ALG, an Application Layer Gateway. It reads up into the SIP text and rewrites the second copy too:

on Alice's LANforwarded to Bob
IP header, src192.168.1.10203.0.113.9, rewritten by NAT
SIP text, Via:192.168.1.10:5060203.0.113.9:5060, rewritten by the ALG

Now Bob replies to 203.0.113.9, which reaches Alice's router, and the call connects.

On Linux that ALG is the nf_conntrack_sip helper. The setup used here is an unpatched box forwarding between two networks with the helper attached and SIP NAT rewriting active:

1sysctl -w net.ipv4.ip_forward=1 2iptables -t raw -A PREROUTING -p udp --dport 5060 -j CT --helper sip 3iptables -t nat -A POSTROUTING -o <wan> -j MASQUERADE

Nothing has to be listening on the box, and no machine has to exist on the far side. The packet is read on its way through.

How the helper finds the address

Here is a SIP request-line fragment, without CRLF or the rest of the message. From here on, we follow this example: the helper works on the text.

dptr at byte 18, end at byte 35, limit at 43dptr at byte 18, end at byte 35, limit at 43

Before it can replace 192.168.1.10:5060 the helper has to say exactly where that address starts and where it ends. That is the whole job of ct_sip_parse_request(). It keeps two pointers: start, which never moves, and dptr, which walks forward through the text:

Request parser with inline value annotationsRequest parser with inline value annotations

The one call that matters is in the middle:

end points to byte 31 before parsing and byte 35 afterwardend points to byte 31 before parsing and byte 35 afterward

Note what sets end. Not the surrounding code, but simple_strtoul(), which has no argument for where the packet ends. It stops when it sees a byte that is not a digit, and here that byte is the space on 35.

So the helper comes out with offset 18 and length 17: exactly the 192.168.1.10:5060 marked above. Those seventeen bytes are the correct address span for the helper to replace.

The bug

Change the port from 5060 to 506 and remove everything after it. No version string, no newline: the packet ends on a digit.

That is not a valid SIP request line, and nothing on this path notices. nf_nat_sip() looks only at whether the text starts with SIP/2.0, to tell a request from a response. ct_sip_parse_request() returns as soon as it has the port. Neither ever checks that a version string is there. The kernel rewrites the packet long before any SIP application would get the chance to reject it.

Truncated payload with dptr at byte 18 and limit at 34Truncated payload with dptr at byte 18 and limit at 34

simple_strtoul() reads 5, 0, 6, and then looks at byte 34 to decide whether to keep going. Byte 34 is past the end of the packet. The function has no way to know that, because none of its arguments carry it:

Port parsing callPort parsing call

So it reads byte 34 anyway. If that byte is an ASCII digit, say a 3, followed by a non-digit, the 3 gets folded into the number. p comes back 5063 and end comes back 35, one byte past limit. matchlen is computed from that end, unchanged:

Match length calculationMatch length calculation

Seventeen bytes, of which only sixteen are in the packet:

17-byte match spanning 16 payload bytes and one stray byte17-byte match spanning 16 payload bytes and one stray byte

What that wrong length does

The replacement address is rarely the same length as the one it replaces, so before writing it in, the kernel has to slide the rest of the packet along to make room. mangle_contents() does the slide, and the third argument is how many bytes there are left to move: the end of the packet, minus the end of the match.

NAT packet rewriteNAT packet rewrite

On the earlier fragment that count is 8, the " SIP/2.0" after the address. Here the match ends on byte 35 and the packet ends on byte 34. There is one byte less than nothing:

134 - (18 + 17) = -1

memmove() takes that count as a size_t, which is unsigned and cannot hold a negative number. On our 64-bit test kernel, minus one becomes the largest value it can hold, 2^64 - 1. The kernel passes that count to memmove() while forwarding the packet. With KASAN enabled, we captured:

1BUG: KASAN: out-of-bounds in mangle_contents+0x110/0x434 2Read of size 18446744073709551615 at addr ffff23cbc8428051 by task python3/195 3Call trace: 4 __asan_memmove 5 mangle_contents 6 nf_nat_mangle_udp_packet 7 mangle_packet 8 map_addr 9 nf_nat_sip 10 process_sip_msg 11 sip_help_udp 12 nf_confirm 13 nf_hook_slow 14 ip_output 15 ip_forward 16 ip_rcv

On our Linux 6.12 arm64 build without KASAN, the same attack caused a kernel panic:

1Unable to handle kernel paging request at virtual address 0040ffff29418b16 2Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP 3Kernel panic - not syncing: kernel stack overflow 4SMP: stopping secondary CPUs

Making it happen reliably

The port has to match the port the packet came from. The helper only rewrites an address belonging to the connection the packet arrived on, so the port the parser ends up with has to equal the source port we sent from. The parser's port is 506 with one stray digit glued on the end, which puts it somewhere in 5060 to 5069, and the digit is not ours to pick. The source port is. We open ten sockets, bound to 5060, 5061, and so on up to 5069, and send the same packet out of every one. Whatever the digit turns out to be, one of the ten went out from the port that matches it.

The stray byte has to be a digit. It is not ours. It belongs to the kernel's buffer, which is always allocated larger than the packet, and we sampled that byte thousands of times without once finding a digit there. So we put one there. Flood the box with UDP packets made of nothing but digits, aimed at a port with no helper on it so they are dropped without reaching the parser. The kernel recycles the memory those packets sat in, and some of it still holds digits afterwards.

That scatters digits around the right area. To land on one exactly, use the fact that the byte we read is always the one immediately after our packet. A longer trigger reads a byte further along. So we pair every trigger with a flood packet one byte longer than it, which puts that flood packet's last digit precisely where this trigger will read, and then sweep the trigger's length. Leading zeros are what let us change the length without changing the port. 506, 0506 and 000000506 are three different packet lengths that all parse to 506.

When we miss, nothing happens. The port stays 506, which is below the parser's own p < 1024 check, so it gives up and the packet goes through untouched.

Around one packet in 17,000 to 30,000 lands both. That is a few seconds of traffic.

The Linux CNA assessment rates this 9.8 Critical, citing the out-of-bounds read and potential kernel memory corruption. Our PoC demonstrates a remote crash.

The fix

The vulnerable version used for this PoC was Linux 6.12.0, without the fix below.

simple_strtoul() is replaced by a new sip_parse_port(), which checks every digit against the end of the packet and rejects a port that runs to the boundary without a terminating character.

Other bugs we've reported

All of these bugs were identified by the VIDOC security scanner.

Bugs we are credited for

Official titleAssigned CVSS scoreFixCVE
netfilter: nf_conntrack_h323: fix OOB read in decode_int() CONS case8.21e3a3593162cCVE-2026-23456
netfilter: nf_conntrack_h323: check for zero length in DecodeQ931()9.1f173d0f4c0f6CVE-2026-23455
netfilter: xt_time: use unsigned int for monthday bit shift—00050ec08cecNot assigned
pnfs/flexfiles: validate ds_versions_cnt is non-zero—94545ffc0ae8Not assigned

Bugs others found first

We reported these too, but the researchers below got there first.

Official titleAssigned CVSS scoreFixCVEFound first by
netfilter: conntrack: add missing netlink policy validations7.1f900e1d77ee0CVE-2026-31407Hyunwoo Kim
netfilter: ctnetlink: fix use-after-free in ctnetlink_dump_exp_ct()7.85cb81eeda909CVE-2026-23458Hyunwoo Kim
netfilter: conntrack: remove sprintf usage9.86e7066bdb481CVE-2026-53002Yiming Qian
erspan: Initialize options_len before referencing options.7.535ddf66c65efCVE-2025-71128Frode Nordahl
net: fix geneve_opt length integer overflow7.1b27055a08ad4CVE-2025-22055Lin Ma
netfilter: nft_tunnel: fix geneve_opt type confusion addition7.81b755d8eb1acCVE-2025-22056Lin Ma
Share:

Ready to secure your application?

Vidoc finds and fixes vulnerabilities in real-time.
Ship secure applications faster.

Get VIDOC

More articles

Explore insights, trends, and tips to stay ahead in cybersecurity.