https://github.com/torvalds/linux
Revision a285860211bf257b0e6d522dac6006794be348af authored by Tobias Jungel on 17 May 2017, 07:29:12 UTC, committed by David S. Miller on 18 May 2017, 14:15:00 UTC
Currently it is allowed to set the default pvid of a bridge to a value
above VLAN_VID_MASK (0xfff). This patch adds a check to br_validate and
returns -EINVAL in case the pvid is out of bounds.

Reproduce by calling:

[root@test ~]# ip l a type bridge
[root@test ~]# ip l a type dummy
[root@test ~]# ip l s bridge0 type bridge vlan_filtering 1
[root@test ~]# ip l s bridge0 type bridge vlan_default_pvid 9999
[root@test ~]# ip l s dummy0 master bridge0
[root@test ~]# bridge vlan
port	vlan ids
bridge0	 9999 PVID Egress Untagged

dummy0	 9999 PVID Egress Untagged

Fixes: 0f963b7592ef ("bridge: netlink: add support for default_pvid")
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Tobias Jungel <tobias.jungel@bisdn.de>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 47ab37a
History
Tip revision: a285860211bf257b0e6d522dac6006794be348af authored by Tobias Jungel on 17 May 2017, 07:29:12 UTC
bridge: netlink: check vlan_default_pvid range
Tip revision: a285860
File Mode Size
Makefile -rw-r--r-- 377 bytes
compat.c -rw-r--r-- 19.1 KB
compat_mq.c -rw-r--r-- 3.9 KB
ipc_sysctl.c -rw-r--r-- 5.4 KB
mq_sysctl.c -rw-r--r-- 2.9 KB
mqueue.c -rw-r--r-- 35.8 KB
msg.c -rw-r--r-- 23.5 KB
msgutil.c -rw-r--r-- 3.6 KB
namespace.c -rw-r--r-- 4.6 KB
sem.c -rw-r--r-- 55.5 KB
shm.c -rw-r--r-- 33.5 KB
syscall.c -rw-r--r-- 2.3 KB
util.c -rw-r--r-- 21.0 KB
util.h -rw-r--r-- 6.4 KB

back to top