summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChris Branch <cbranch@cloudflare.com>2018-09-20 13:28:53 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-25 05:18:11 +0200
commit7c971d7ef458d47908940396149bf56e6335fb04 (patch)
treeac69c4d52296abbbf6bc26d89c27135da8dedbe0
parent70bcf9ecb801dadd82c68143209ca2707aa63d2b (diff)
Fix transport message length check
wireguard-go has a bad length check in its transport message handling. Although it cannot be exploited because of another length check earlier in the function, this should be fixed regardless.
-rw-r--r--receive.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/receive.go b/receive.go
index 01151ca..abe4e57 100644
--- a/receive.go
+++ b/receive.go
@@ -147,7 +147,7 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
// check size
- if len(packet) < MessageTransportType {
+ if len(packet) < MessageTransportSize {
continue
}