LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* potential null pointer dereference in drivers/isdn/hisax/isdnl2.c
@ 2011-02-03 20:27 Jesper Juhl
  2011-02-14  0:53 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2011-02-03 20:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, Tejun Heo, Karsten Keil

Hi,

In drivers/isdn/hisax/isdnl2.c:l2_pull_iqueue() we have this:

	...
		skb = alloc_skb(oskb->len + i, GFP_ATOMIC);
		memcpy(skb_put(skb, i), header, i);
	...

If alloc_skb() fails and returns NULL then the second line will cause a 
NULL pointer dereference - skb_put() gives the pointer to 
skb_tail_pointer() which dereferences it.

I'm not quite sure how this should be dealt with, so I'll just report it 
rather than submit a patch. Happy bug fixing :-)


-- 
Jesper Juhl <jj@chaosbits.net>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-15 20:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 20:27 potential null pointer dereference in drivers/isdn/hisax/isdnl2.c Jesper Juhl
2011-02-14  0:53 ` David Miller
2011-02-15 20:09   ` Milton Miller
2011-02-15 20:15     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).