projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ipv4: tcp_input: fix stack out of bounds when parsing TCP options.
[platform/kernel/linux-starfive.git]
/
net
/
ipv4
/
tcp_input.c
diff --git
a/net/ipv4/tcp_input.c
b/net/ipv4/tcp_input.c
index
c61edd0
..
08a477e
100644
(file)
--- a/
net/ipv4/tcp_input.c
+++ b/
net/ipv4/tcp_input.c
@@
-3791,6
+3791,8
@@
void tcp_parse_options(const struct net *net,
length--;
continue;
default:
+ if (length < 2)
+ return;
opsize = *ptr++;
if (opsize < 2) /* "silly options" */
return;