mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
batman-adv: ensure minimal ethernet header on TX
As documented in commit8bd67ebb50("net: bridge: xmit: make sure we have at least eth header len bytes"), it is possible by for a local user with eBPF TC hook access to attach a tc filter which truncates the packet and redirects to an batadv interface. But the code assumes that at least ETH_HLEN bytes are available and thus might read outside of the available buffer. The batadv_interface_tx() must therefore always check itself if enough data is available for the ethernet header and don't rely on min_header_len. Cc: stable@vger.kernel.org Fixes:c6c8fea297("net: Add batman-adv meshing protocol") Reported-by: Sashiko <sashiko-bot@kernel.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
26560c4a03
commit
49df66b799
1 changed files with 3 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue