diff options
author | Jason Wang <jasowang@redhat.com> | 2012-05-30 21:18:10 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-07-12 04:32:11 +0100 |
commit | caade06b9bc468620636953b15d7d36a12d2b88e (patch) | |
tree | 8d3f2bf011beece9587428d51d8fb0bbabcbbc50 /crypto | |
parent | bd00fcf3ec0c7fc0b194ba37a07564517fed11b8 (diff) |
net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()
[ Upstream commit cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc ]
We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions