artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6235ec
)
Fix potential underflow when printing STP data.
author
mbuhl
<mbuhl@openbsd.org>
Mon, 13 Mar 2023 14:58:01 +0000
(14:58 +0000)
committer
mbuhl
<mbuhl@openbsd.org>
Mon, 13 Mar 2023 14:58:01 +0000
(14:58 +0000)
Reported by Peter J. Philipp
ok claudio
usr.sbin/tcpdump/print-stp.c
patch
|
blob
|
history
diff --git
a/usr.sbin/tcpdump/print-stp.c
b/usr.sbin/tcpdump/print-stp.c
index
d9087c7
..
07a4b8f
100644
(file)
--- a/
usr.sbin/tcpdump/print-stp.c
+++ b/
usr.sbin/tcpdump/print-stp.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: print-stp.c,v 1.1
0 2021/12/01 18:28:46 deraadt Exp $
*/
+/* $OpenBSD: print-stp.c,v 1.1
1 2023/03/13 14:58:01 mbuhl Exp $
*/
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@
-99,6
+99,8
@@
stp_print(p, len)
else if (p[0] == LLCSAP_SNAP && p[1] == LLCSAP_SNAP && p[2] == LLC_UI) {
proto = STP_PROTO_SSTP;
printf("SSTP");
+ if (len < 8)
+ goto truncated;
p += 5;
len -= 5;
} else {