diff options
author | Hristo Venev <hristo@venev.name> | 2021-04-12 20:41:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-13 14:31:52 -0700 |
commit | 610f8c0fc8d46e0933955ce13af3d64484a4630a (patch) | |
tree | c8d9d8b5b5e7120520c55cca7267b20aec0a2348 /init/noinitramfs.c | |
parent | ccb39c6285581992f0225c45e4de704028a8ec17 (diff) | |
download | linux-610f8c0fc8d46e0933955ce13af3d64484a4630a.tar.bz2 |
net: sit: Unregister catch-all devices
A sit interface created without a local or a remote address is linked
into the `sit_net::tunnels_wc` list of its original namespace. When
deleting a network namespace, delete the devices that have been moved.
The following script triggers a null pointer dereference if devices
linked in a deleted `sit_net` remain:
for i in `seq 1 30`; do
ip netns add ns-test
ip netns exec ns-test ip link add dev veth0 type veth peer veth1
ip netns exec ns-test ip link add dev sit$i type sit dev veth0
ip netns exec ns-test ip link set dev sit$i netns $$
ip netns del ns-test
done
for i in `seq 1 30`; do
ip link del dev sit$i
done
Fixes: 5e6700b3bf98f ("sit: add support of x-netns")
Signed-off-by: Hristo Venev <hristo@venev.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'init/noinitramfs.c')
0 files changed, 0 insertions, 0 deletions