From: David Miller <davem@davemloft.net>
To: pablo@netfilter.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] netlink: fix wrong subscription bitmask to group mapping in binding callbacks
Date: Thu, 08 Jan 2015 20:04:29 -0800 (PST) [thread overview]
Message-ID: <20150108.200429.1274496391828010187.davem@davemloft.net> (raw)
In-Reply-To: <1420633915-25475-1-git-send-email-pablo@netfilter.org>
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 7 Jan 2015 13:31:55 +0100
> The subscription bitmask passed via struct sockaddr_nl is converted to
> the group number when calling the netlink_bind() and netlink_unbind()
> callbacks.
>
> The conversion is however incorrect since bitmask (1 << 0) needs to be
> mapped to group number 1. Note that you cannot specify the group number 0
> (usually known as _NONE) from setsockopt() using NETLINK_ADD_MEMBERSHIP
> since this is rejected through -EINVAL.
>
> This problem became noticeable since 97840cb ("netfilter: nfnetlink:
> fix insufficient validation in nfnetlink_bind") when binding to bitmask
> (1 << 0) in ctnetlink.
>
> Reported-by: Andre Tomt <andre@tomt.net>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This gets rejects when I try to apply it to 'net', please
respin.
Thanks.
prev parent reply other threads:[~2015-01-09 3:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 12:31 [PATCH net] netlink: fix wrong subscription bitmask to group mapping in binding callbacks Pablo Neira Ayuso
2015-01-09 4:04 ` David Miller [this message]
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=20150108.200429.1274496391828010187.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.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 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).