aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2026-10-25 00:09:52 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2026-10-25 00:09:52 +0200
commitb3bc704ef0ee21a36298601a9e1e5ff90377ac52 (patch)
tree90e01c8fa1ec41d742c9091b7ff31c82801ef83b
parentdevice: noise: reject response consumption after intermediate initiation (diff)
downloadwireguard-go-master.tar.xz
wireguard-go-master.zip
device: don't overflow uint16 when adding v4 header lengthHEADmaster
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--device/receive.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/receive.go b/device/receive.go
index 1392957..6f9d90a 100644
--- a/device/receive.go
+++ b/device/receive.go
@@ -490,7 +490,7 @@ func (peer *Peer) RoutineSequentialReceiver(maxBatchSize int) {
continue
}
field := elem.packet[IPv6offsetPayloadLength : IPv6offsetPayloadLength+2]
- length := binary.BigEndian.Uint16(field)
+ length := uint32(binary.BigEndian.Uint16(field))
length += ipv6.HeaderLen
if int(length) > len(elem.packet) {
continue