Browse Source

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 <pablo@netfilter.org>
Pablo Neira Ayuso 10 years ago
parent
commit
62924af247
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/netfilter/nfnetlink.c

+ 1 - 1
net/netfilter/nfnetlink.c

@@ -470,7 +470,7 @@ static int nfnetlink_bind(int group)
 	int type;
 	int type;
 
 
 	if (group <= NFNLGRP_NONE || group > NFNLGRP_MAX)
 	if (group <= NFNLGRP_NONE || group > NFNLGRP_MAX)
-		return -EINVAL;
+		return 0;
 
 
 	type = nfnl_group2type[group];
 	type = nfnl_group2type[group];