Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vde_switch crashes if vlan # 0 is removed #23

Open
guenther-brunthaler opened this issue Nov 25, 2020 · 0 comments
Open

vde_switch crashes if vlan # 0 is removed #23

guenther-brunthaler opened this issue Nov 25, 2020 · 0 comments

Comments

@guenther-brunthaler
Copy link

In older versions of vde2 the following switch startup configuration worked like a charm:

vlan/create 1 # isolated w/o real network access
vlan/create 2 # access to local samba server
vlan/create 3 # bridged to hypervisor
port/setvlan 1 1
port/setvlan 2 3
port/create 3
port/setvlan 3 2
vlan/remove 0

In other words, I set up 3 new VLANs and then removed the default VLAN # 0.

I did this because this default VLAN seemed to be special in that it was exempt from VLAN filtering and could therefore see all the traffic. I considered that a security risk and therefore deleted the VLAN.

However, current versions of vde_switch crash when adding new ports after VLAN # 0 has been removed.

Core dump analysis shows the crash happens in line 170 of file src/vde_switch/port.c where the expression

ba_set(vlant[0].table,i)

is evaluated with vlant[0].table containing a null pointer.

Suggested course of action: Either the code should check whether vlant[0].table contains a null pointer and then avoid dereferencing it, or removal of VLAN # 0 should be forbidden because then there will not be a null pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant