Skip to content
Commit cc9b17ad authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

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: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 914bec10
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment