]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vxlan: drop packets from invalid src-address
authorDavid Bauer <mail@david-bauer.net>
Thu, 18 Apr 2024 13:29:08 +0000 (15:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:34 +0000 (16:32 +0200)
commitb5fa073ae9da6d64cf2a2505ba5d1f28b53207f9
tree9a7c43dcbcdfd6189e770a47cfdf52ddc9855de1
parent3ccbec645debc15c797b154d4ff1b9acd30f23d8
vxlan: drop packets from invalid src-address

[ Upstream commit f58f45c1e5b92975e91754f5407250085a6ae7cf ]

The VXLAN driver currently does not check if the inner layer2
source-address is valid.

In case source-address snooping/learning is enabled, a entry in the FDB
for the invalid address is created with the layer3 address of the tunnel
endpoint.

If the frame happens to have a non-unicast address set, all this
non-unicast traffic is subsequently not flooded to the tunnel network
but sent to the learnt host in the FDB. To make matters worse, this FDB
entry does not expire.

Apply the same filtering for packets as it is done for bridges. This not
only drops these invalid packets but avoids them from being learnt into
the FDB.

Fixes: d342894c5d2f ("vxlan: virtual extensible lan")
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/vxlan/vxlan_core.c