netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* igmp: possible NULL dereference after GFP_ATOMIC allocation?
@ 2007-01-30 10:57 Alexey Dobriyan
  2007-01-30 11:34 ` David Stevens
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Dobriyan @ 2007-01-30 10:57 UTC (permalink / raw)
  To: netdev; +Cc: kuznet, dlstevens, davem

igmpv3_newpack() uses alloc_skb() with GFP_ATOMIC.
It fails, igmpv3_newpack() returns NULL.
add_grhead(), sees NULL,  returns NULL.

At one place add_grhead() return value fed into skb_put() which
dereferences it.

net/ipv4/igmp.c:
   454			if (first) {
   455				skb = add_grhead(skb, pmc, type, &pgr);
   456				first = 0;
   457			}
   458			psrc = (u32 *)skb_put(skb, sizeof(u32));


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

end of thread, other threads:[~2007-02-06 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-30 10:57 igmp: possible NULL dereference after GFP_ATOMIC allocation? Alexey Dobriyan
2007-01-30 11:34 ` David Stevens
2007-01-30 15:04   ` Alexey Dobriyan
2007-01-31  9:39     ` Jarek Poplawski
2007-02-05 15:04   ` [PATCH] igmp: check add_grhead() return value Alexey Dobriyan
2007-02-06 22:35     ` 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).