net: check packet payload length
commit362786f14a753d8a5256ef97d7c10ed576d6572b
authorPrasad J Pandit <pjp@fedoraproject.org>
Wed, 2 Mar 2016 11:59:58 +0000 (2 17:29 +0530)
committerJason Wang <jasowang@redhat.com>
Tue, 8 Mar 2016 07:34:18 +0000 (8 15:34 +0800)
treedf46cf293e0e12fdd91068e3aa60b228a8ab061d
parentf1b2bc601af5037f0af6d55575e619b912e348b5
net: check packet payload length

While computing IP checksum, 'net_checksum_calculate' reads
payload length from the packet. It could exceed the given 'data'
buffer size. Add a check to avoid it.

Reported-by: Liu Ling <liuling-it@360.cn>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/checksum.c