diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-01-13 21:53:38 +0100 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-01-13 22:11:12 +0100 |
commit | ed7809d9c41b514115ddffaa860694393c2016b3 (patch) | |
tree | ef0e14d7477b2363f787ace24b683a439ea103f2 /tools | |
parent | 53320fe3bb1b1eef1aaff8dd47aae530ebeeb1e5 (diff) | |
download | op-kernel-dev-ed7809d9c41b514115ddffaa860694393c2016b3.zip op-kernel-dev-ed7809d9c41b514115ddffaa860694393c2016b3.tar.gz |
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>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions