From: Chris Branch <cbranch@cloudflare.com>
To: wireguard@lists.zx2c4.com
Subject: [PATCH] Fix transport message length check
Date: Thu, 20 Sep 2018 13:28:53 +0100 [thread overview]
Message-ID: <20180920122853.33762-1-cbranch@cloudflare.com> (raw)
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.
---
receive.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/receive.go b/receive.go
index 6b6543c..cbc3fd1 100644
--- a/receive.go
+++ b/receive.go
@@ -146,7 +146,7 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
// check size
- if len(packet) < MessageTransportType {
+ if len(packet) < MessageTransportSize {
continue
}
--
2.11.0
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
next reply other threads:[~2018-09-25 3:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 12:28 Chris Branch [this message]
2018-09-25 3:20 ` [PATCH] Fix transport message length check Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180920122853.33762-1-cbranch@cloudflare.com \
--to=cbranch@cloudflare.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).