fix firewall port/proto bypass in parseV6 from uint8 extension-header length overflow (#1789)

This commit is contained in:
Nate Brown
2026-07-07 20:43:26 -05:00
committed by GitHub
parent 1e66c0d3ee
commit c1eea118f4
2 changed files with 37 additions and 4 deletions
+2 -4
View File
@@ -422,16 +422,14 @@ func parseV6(data []byte, incoming bool, fp *firewall.Packet) error {
if dataLen <= offset+1 {
break
}
next = int(data[offset+1]+2) << 2
next = (int(data[offset+1]) + 2) << 2
default:
// Normal ipv6 header length processing
if dataLen <= offset+1 {
break
}
next = int(data[offset+1]+1) << 3
next = (int(data[offset+1]) + 1) << 3
}
if next <= 0 {