commit | cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc | [log] [tgz] |
---|---|---|
author | Jason Wang <jasowang@redhat.com> | Wed May 30 21:18:10 2012 +0000 |
committer | David S. Miller <davem@davemloft.net> | Thu May 31 18:22:45 2012 -0400 |
tree | dbf402b10788ab22d1d9d8c14866a910be497c29 | |
parent | 914bec1011a25f65cdc94988a6f974bfb9a3c10d [diff] |
net: sock: validate data_len before allocating skb in sock_alloc_send_pskb() 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>