Skip to contentSkip to conversation

net: fix address check in rtnl_fdb_del

PATCH Applied Vlad Yasevich 2 participants 4 messages Apr 23, 2013 – Apr 25, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: fix address check in rtnl_fdb_del

Commit 6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tables

relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check in rtnl_fdb_del() still uses a more strict is_valid_ether_addr() which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check in rtnl_fdb_del() as well.

---
 net/core/rtnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/rtnetlink.c +1 -1
index 18af08a..2c54cc1 100644
@@ -2192,7 +2192,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
 	}
 
 	addr = nla_data(tb[NDA_LLADDR]);
-	if (!is_valid_ether_addr(addr)) {
+	if (is_zero_ether_addr(addr)) {
 		pr_info("PF_BRIDGE: RTM_DELNEIGH with invalid ether address\n");
 		return -EINVAL;
 	}
Signature · 1 line
1.8.1.4
maintainer
#1 lore raw

From: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:05:23 -0400

Quoted 11 lines

Commit 6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tables

relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check in rtnl_fdb_del() still uses a more strict is_valid_ether_addr() which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check in rtnl_fdb_del() as well.

I don't think you were able to actually test this patch in the amount of time between when the bug in your initial version was shown to you and when you posted this new version.

If you indeed didn't test this patch, I really don't think that's acceptable, to be honest with you.

#2 lore raw
Quoted 13 lines · David Miller

From: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:05:23 -0400

Quoted 10 lines

Commit 6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tables

relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check in rtnl_fdb_del() still uses a more strict is_valid_ether_addr() which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check in rtnl_fdb_del() as well.

Quoted 9 lines
Quoted 1 line

I don't think you were able to actually test this patch in the amount of time between when the bug in your initial version was shown to you and when you posted this new version.

If you indeed didn't test this patch, I really don't think that's acceptable, to be honest with you.

I actually did test this patch and found the issue in the testing of the
bridging changes I was working on. It just that I goofed the stand alone fix that I thought might warrant a separate submission while I run more tests on the bridging code.

-vlad

maintainer Applied
#3 lore raw
In reply to Vlad Yasevich

From: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:05:23 -0400

Quoted 11 lines

Commit 6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tables

relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check in rtnl_fdb_del() still uses a more strict is_valid_ether_addr() which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check in rtnl_fdb_del() as well.

Applied.