diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2016-12-12 10:13:41 -0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-12-12 10:13:41 -0800 |
commit | 8a2ec431d5987e1d93c13208da1dcd0e430114ae (patch) | |
tree | f637129753cfb35421fce566fcbb42f98540a8d7 /net/ipv4/ping.c | |
parent | 97b84c96505aa2b9c8772bbae68a4fa93da8c0f4 (diff) | |
parent | c95b7f1fab0c76882764a5196119237c8ad436ee (diff) |
Merge tag 'v4.4.38' into android-4.4.y
This is the 4.4.38 stable release
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 0d5278ca4777..cd2cf3515c66 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -660,6 +660,10 @@ int ping_common_sendmsg(int family, struct msghdr *msg, size_t len, if (len > 0xFFFF) return -EMSGSIZE; + /* Must have at least a full ICMP header. */ + if (len < icmph_len) + return -EINVAL; + /* * Check the flags. */ |