From: David Miller <davem@redhat.com>
To: andrew@lunn.ch
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] ipv4: igmp: Allow removing groups from a removed interface
Date: Mon, 30 Nov 2015 11:01:48 -0500 (EST) [thread overview]
Message-ID: <20151130.110148.959343190265894374.davem@redhat.com> (raw)
In-Reply-To: <1448482536-26081-1-git-send-email-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 25 Nov 2015 21:15:36 +0100
> @@ -2126,7 +2126,7 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
> ASSERT_RTNL();
>
> in_dev = ip_mc_find_dev(net, imr);
> - if (!in_dev) {
> + if (!imr->imr_ifindex && !imr->imr_address.s_addr && !in_dev) {
> ret = -ENODEV;
> goto out;
> }
Now, ip_mc_dec_group() below can take a NULL pointer dereference. One example
is if imr_ifindex is specified and the lookup returns NULL in ip_mc_find_dev().
This is so rediculously complicated, just looking at this code breaks something.
next prev parent reply other threads:[~2015-11-30 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 20:15 [PATCH net] ipv4: igmp: Allow removing groups from a removed interface Andrew Lunn
2015-11-30 16:01 ` David Miller [this message]
2015-11-30 17:06 ` Andrew Lunn
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=20151130.110148.959343190265894374.davem@redhat.com \
--to=davem@redhat.com \
--cc=andrew@lunn.ch \
--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.