From: Pablo Neira Ayuso Date: Sun, 4 Jan 2015 14:20:41 +0000 (+0100) Subject: netfilter: nfnetlink: relax strict multicast group check from netlink_bind X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62924af247e95de7041a6d6f2d06cdd05152e2dc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git netfilter: nfnetlink: relax strict multicast group check from netlink_bind Relax the checking that was introduced in 97840cb ("netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind") when the subscription bitmask is used. Existing userspace code code may request to listen to all of the existing netlink groups by setting an all to one subscription group bitmask. Netlink already validates subscription via setsockopt() for us. Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index c6619d4bcc32..1aa7049c93f5 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c @@ -470,7 +470,7 @@ static int nfnetlink_bind(int group) int type; if (group <= NFNLGRP_NONE || group > NFNLGRP_MAX) - return -EINVAL; + return 0; type = nfnl_group2type[group];