All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@openvz.org>
To: netdev@vger.kernel.org
Cc: kuznet@ms2.inr.ac.ru, dlstevens@us.ibm.com, davem@davemloft.net
Subject: igmp: possible NULL dereference after GFP_ATOMIC allocation?
Date: Tue, 30 Jan 2007 13:57:01 +0300	[thread overview]
Message-ID: <20070130105701.GA6015@localhost.sw.ru> (raw)

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));


             reply	other threads:[~2007-01-30 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 10:57 Alexey Dobriyan [this message]
2007-01-30 11:34 ` igmp: possible NULL dereference after GFP_ATOMIC allocation? 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

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=20070130105701.GA6015@localhost.sw.ru \
    --to=adobriyan@openvz.org \
    --cc=davem@davemloft.net \
    --cc=dlstevens@us.ibm.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.