The IPv6 header contains a payload length that excludes the 40 bytes of
IPv6 packet header, which differs from IPv4's total length which includes
it. As a result, the parser was wrong and would only see the IP part and
not the TCP one unless sufficient options were present tocover it.
This issue came in 3.4-dev2 with recent commit
e88e03a6e4 ("MINOR:
net_helper: add ip.fp() to build a simplified fingerprint of a SYN"),
so no backport is needed.
if (smp->data.u.str.data < 40)
return 0;
- pktlen = read_n16(smp->data.u.str.area + 4);
+ pktlen = 40 + read_n16(smp->data.u.str.area + 4);
// extension/next proto => ext present if !tcp && !udp
ipext = smp->data.u.str.area[6];
ipext = ipext != 6 && ipext != 17;