lkml.org 
[lkml]   [2011]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpotential null pointer dereference in drivers/isdn/hisax/isdnl2.c
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.



\
 
 \ /
  Last update: 2011-02-03 21:31    [W:0.066 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site