mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 09:36:58 +02:00
fix firewall port/proto bypass in parseV6 from uint8 extension-header length overflow (#1789)
This commit is contained in:
+2
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user