diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-12-12 22:16:26 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-12-12 22:16:26 +0800 |
commit | a057484ab40ff81f22a94bb62c035c78b5abd940 (patch) | |
tree | 770ed007ccc70bee7e533a7fe532dd8a774b1457 /net/ipv4/ping.c | |
parent | 3ba1692e7239293d7bc5a596ca9b0707f5bc07d5 (diff) | |
parent | c95b7f1fab0c76882764a5196119237c8ad436ee (diff) |
Merge remote-tracking branch 'lts/linux-4.4.y' into linux-linaro-lsk-v4.4
Conflicts:
also change cpu_enable_uao in arch/arm64/include/asm/processor.h
comment unmatch fixed in arch/arm64/kernel/suspend.c
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 aa67e0e64b69..23160d2b3f71 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. */ |