WSL2-Linux-Kernel/net/batman-adv
Sven Eckelmann a726d01d54 batman-adv: Don't accept TT entries for out-of-spec VIDs
commit 537a350d14321c8cca5efbf0a33a404fec3a9f9e upstream.

The internal handling of VLAN IDs in batman-adv is only specified for
following encodings:

* VLAN is used
  - bit 15 is 1
  - bit 11 - bit 0 is the VLAN ID (0-4095)
  - remaining bits are 0
* No VLAN is used
  - bit 15 is 0
  - remaining bits are 0

batman-adv was only preparing new translation table entries (based on its
soft interface information) using this encoding format. But the receive
path was never checking if entries in the roam or TT TVLVs were also
following this encoding.

It was therefore possible to create more than the expected maximum of 4096
+ 1 entries in the originator VLAN list. Simply by setting the "remaining
bits" to "random" values in corresponding TVLV.

Cc: stable@vger.kernel.org
Fixes: 7ea7b4a142 ("batman-adv: make the TT CRC logic VLAN specific")
Reported-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 09:14:49 +02:00
..
Kconfig
Makefile
bat_algo.c
bat_algo.h
bat_iv_ogm.c
bat_iv_ogm.h
bat_v.c
bat_v.h
bat_v_elp.c batman-adv: Do not get eth header before batadv_check_management_packet 2023-08-30 16:18:17 +02:00
bat_v_elp.h
bat_v_ogm.c batman-adv: Fix batadv_v_ogm_aggr_send memory leak 2023-08-30 16:18:17 +02:00
bat_v_ogm.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: Use netif_rx_any_context() any. 2022-07-29 17:25:07 +02:00
bridge_loop_avoidance.h
distributed-arp-table.c batman-adv: Broken sync while rescheduling delayed work 2023-06-14 11:13:04 +02:00
distributed-arp-table.h
fragmentation.c batman-adv: Don't skb_split skbuffs with frag_list 2022-05-18 10:26:47 +02:00
fragmentation.h
gateway_client.c
gateway_client.h
gateway_common.c
gateway_common.h
hard-interface.c batman-adv: Don't increase MTU when set by user 2023-08-30 16:18:17 +02:00
hard-interface.h
hash.c
hash.h
log.c
log.h
main.c net: batman-adv: fix error handling 2021-10-26 14:47:12 +01:00
main.h
multicast.c ipv6: make mc_forwarding atomic 2022-04-13 20:59:03 +02:00
multicast.h batman-adv: mcast: don't send link-local multicast to mcast routers 2022-01-11 15:35:14 +01:00
netlink.c batman-adv: Hold rtnl lock during MTU update via netlink 2023-08-30 16:18:18 +02:00
netlink.h
network-coding.c net: batman-adv: fix error handling 2021-10-26 14:47:12 +01:00
network-coding.h
originator.c batman-adv: Don't accept TT entries for out-of-spec VIDs 2024-07-05 09:14:49 +02:00
originator.h
routing.c
routing.h
send.c
send.h
soft-interface.c net: vlan: introduce skb_vlan_eth_hdr() 2023-12-20 15:17:35 +01:00
soft-interface.h
tp_meter.c
tp_meter.h
trace.c
trace.h
translation-table.c batman-adv: Avoid infinite loop trying to resize local TT 2024-04-17 11:15:13 +02:00
translation-table.h
tvlv.c
tvlv.h
types.h batman-adv: Don't increase MTU when set by user 2023-08-30 16:18:17 +02:00