From: Jason Wang Date: Wed, 30 May 2012 21:18:10 +0000 (+0000) Subject: net: sock: validate data_len before allocating skb in sock_alloc_send_pskb() X-Git-Tag: v3.5-rc1~2^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc;p=pandora-kernel.git 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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed