]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: dat: ensure accessible eth_hdr proto field
authorSven Eckelmann <sven@narfation.org>
Sun, 28 Jun 2026 08:37:07 +0000 (10:37 +0200)
committerSven Eckelmann <sven@narfation.org>
Sun, 28 Jun 2026 09:49:04 +0000 (11:49 +0200)
commit26560c4a03dc4d607331600c187f59ab2df5f341
treeea8f5e86676a34b412bb40480e98ffaa9424beb3
parentcdf3b5af2bc4431e58629e8ad2086b1e9185c761
batman-adv: dat: ensure accessible eth_hdr proto field

When batadv_get_vid() accesses the proto field of the ethernet header, it
is not checking if the data itself is accessible. The caller is responsible
for it. But in contrast to other call sites, batadv_dat_get_vid() and its
caller didn't make sure this is true. This could have caused an
out-of-bounds access.

Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/distributed-arp-table.c
net/batman-adv/main.c