diff options
author | David S. Miller <davem@davemloft.net> | 2016-12-06 21:33:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-06 21:33:19 -0500 |
commit | c63d352f053a788281eb90df0a71cd3a6b2c4040 (patch) | |
tree | ce0c6f0993100d3d8feda1d9d487dfba4abc5bd0 /net/ipv4/ping.c | |
parent | 862b3d2090ae3d8b10bb4ee9275fd932bc4d0d44 (diff) | |
parent | bc3913a5378cd0ddefd1dfec6917cc12eb23a946 (diff) | |
download | op-kernel-dev-c63d352f053a788281eb90df0a71cd3a6b2c4040.zip op-kernel-dev-c63d352f053a788281eb90df0a71cd3a6b2c4040.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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 d11129f..5b2635e 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -657,6 +657,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. */ |