[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <527C1C38.40908@cogentembedded.com>
Date: Fri, 08 Nov 2013 02:03:20 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Jiri Benc <jbenc@...hat.com>, netdev@...r.kernel.org
CC: Pablo Neira Ayuso <pablo@...filter.org>,
Petr Matousek <pmatouse@...hat.com>
Subject: Re: [PATCH net-next] nfnetlink: do not ack malformed messages
Hello.
On 11/07/2013 09:59 PM, Jiri Benc wrote:
> Commit 0628b123c96d ("netfilter: nfnetlink: add batch support and use it
> from nf_tables") introduced a bug leading to various crashes in netlink_ack
> when netlink message with invalid nlmsg_len was sent by an unprivileged
> user.
> Signed-off-by: Jiri Benc <jbenc@...hat.com>
> ---
> net/netfilter/nfnetlink.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
> diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
> index 027f16a..046aa13 100644
> --- a/net/netfilter/nfnetlink.c
> +++ b/net/netfilter/nfnetlink.c
> @@ -363,13 +363,15 @@ static void nfnetlink_rcv(struct sk_buff *skb)
> struct net *net = sock_net(skb->sk);
> int msglen;
>
> - if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
> - return netlink_ack(skb, nlh, -EPERM);
> -
Hm, how it even compiled before your patch?
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists