batman-adv: bat_socket_read missing checks
authorPaul Kot <pawlkt@gmail.com>
Sat, 10 Dec 2011 14:28:34 +0000 (15:28 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 20 Mar 2013 15:03:39 +0000 (15:03 +0000)
commit83257435faca1827b17e7e6e1766f9c0c216595d
treed857152f3f43a71df94f188820e52c9cf3183fa3
parent0eb97065d4a9bc3944f5973ce4279d37b0ef4eb8
batman-adv: bat_socket_read missing checks

commit c00b6856fc642b234895cfabd15b289e76726430 upstream.

Writing a icmp_packet_rr and then reading icmp_packet can lead to kernel
memory corruption, if __user *buf is just below TASK_SIZE.

Signed-off-by: Paul Kot <pawlkt@gmail.com>
[sven@narfation.org: made it checkpatch clean]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/batman-adv/icmp_socket.c