[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201101132213.18503.sven@narfation.org>
Date: Thu, 13 Jan 2011 22:13:15 +0100
From: Sven Eckelmann <sven@...fation.org>
To: Jesper Juhl <jj@...osbits.net>
Cc: b.a.t.m.a.n@...ts.open-mesh.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Marek Lindner <lindner_marek@...oo.de>,
Simon Wunderlich <siwu@....tu-chemnitz.de>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] Even Batman should not dereference NULL pointers
On Thursday 13 January 2011 21:53:38 Jesper Juhl wrote:
> 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.
Applied
Thanks,
Sven
Download attachment "signature.asc " of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists