linux-stable/net/batman-adv
Jesper Juhl ed7809d9c4 batman-adv: Even Batman should not dereference NULL pointers
There's a problem in net/batman-adv/unicast.c::frag_send_skb().
dev_alloc_skb() allocates memory and may fail, thus returning NULL. If
this happens we'll pass a NULL pointer on to skb_split() which in turn
hands it to skb_split_inside_header() from where it gets passed to
skb_put() that lets skb_tail_pointer() play with it and that function
dereferences it. And thus the bat dies.

While I was at it I also moved the call to dev_alloc_skb() above the
assignment to 'unicast_packet' since there's no reason to do that
assignment if the memory allocation fails.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-01-13 22:11:12 +01:00
..
Kconfig net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
Makefile net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
aggregation.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
aggregation.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_debugfs.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_debugfs.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_sysfs.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_sysfs.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bitarray.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bitarray.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_client.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_client.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_common.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_common.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hard-interface.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hard-interface.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hash.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hash.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
icmp_socket.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
icmp_socket.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
main.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
main.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
originator.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
originator.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
packet.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
ring_buffer.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
ring_buffer.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
routing.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
routing.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
send.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
send.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
soft-interface.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
soft-interface.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
translation-table.c batman-adv: Return hna count on local buffer fill 2010-12-20 10:32:03 -08:00
translation-table.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
types.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
unicast.c batman-adv: Even Batman should not dereference NULL pointers 2011-01-13 22:11:12 +01:00
unicast.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
vis.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
vis.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00