net: fix address check in rtnl_fdb_del
Subsystems (2)
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
@@ -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
David Miller
maintainerFrom: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:05:23 -0400
Quoted 11 lines
Commit
6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tablesrelaxed the address checks in
rtnl_fdb_del()to useis_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check inrtnl_fdb_del()still uses a more strictis_valid_ether_addr()which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check inrtnl_fdb_del()as well.Signed-off-by Vlad Yasevich <[email protected]>
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.
Quoted 13 lines · David Miller
From: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:05:23 -0400Quoted 10 lines
Commit
6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tablesrelaxed the address checks in
rtnl_fdb_del()to useis_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check inrtnl_fdb_del()still uses a more strictis_valid_ether_addr()which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check inrtnl_fdb_del()as well.
Quoted 9 lines
Quoted 1 line
Signed-off-by Vlad Yasevich <[email protected]>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
From: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:05:23 -0400
Quoted 11 lines
Commit
6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tablesrelaxed the address checks in
rtnl_fdb_del()to useis_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check inrtnl_fdb_del()still uses a more strictis_valid_ether_addr()which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check inrtnl_fdb_del()as well.Signed-off-by Vlad Yasevich <[email protected]>
Applied.