From: Sven Eckelmann <sven@narfation.org>
To: Jesper Juhl <jj@chaosbits.net>
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
linux-kernel@vger.kernel.org,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
Marek Lindner <lindner_marek@yahoo.de>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [B.A.T.M.A.N.] [PATCH] Even Batman should not dereference NULL pointers
Date: Thu, 13 Jan 2011 22:13:15 +0100 [thread overview]
Message-ID: <201101132213.18503.sven@narfation.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1101132146400.11347@swampdragon.chaosbits.net>
[-- Attachment #1: Type: Text/Plain, Size: 678 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2011-01-13 21:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 20:53 [B.A.T.M.A.N.] [PATCH] Even Batman should not dereference NULL pointers Jesper Juhl
2011-01-13 21:13 ` Sven Eckelmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201101132213.18503.sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=jj@chaosbits.net \
--cc=lindner_marek@yahoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=siwu@hrz.tu-chemnitz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox