linux-yocto/net/batman-adv
Stanislav Fort 5d334bce9f batman-adv: fix OOB read/write in network-coding decode
commit d77b6ff0ce35a6d0b0b7b9581bc3f76d041d4087 upstream.

batadv_nc_skb_decode_packet() trusts coded_len and checks only against
skb->len. XOR starts at sizeof(struct batadv_unicast_packet), reducing
payload headroom, and the source skb length is not verified, allowing an
out-of-bounds read and a small out-of-bounds write.

Validate that coded_len fits within the payload area of both destination
and source sk_buffs before XORing.

Fixes: 2df5278b02 ("batman-adv: network coding - receive coded packets and decode them")
Cc: stable@vger.kernel.org
Reported-by: Stanislav Fort <disclosure@aisle.com>
Signed-off-by: Stanislav Fort <stanislav.fort@aisle.com>
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>
2025-09-09 18:50:21 +02:00
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c batman-adv: Ignore own maximum aggregation size during RX 2025-04-10 14:31:55 +02:00
bat_iv_ogm.h
bat_v_elp.c batman-adv: Drop unmanaged ELP metric worker 2025-03-13 12:50:51 +01:00
bat_v_elp.h batman-adv: Drop unmanaged ELP metric worker 2025-03-13 12:50:51 +01:00
bat_v_ogm.c batman-adv: Ignore own maximum aggregation size during RX 2025-04-10 14:31:55 +02:00
bat_v_ogm.h
bat_v.c batman-adv: Drop unmanaged ELP metric worker 2025-03-13 12:50:51 +01:00
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c
bridge_loop_avoidance.h
distributed-arp-table.c
distributed-arp-table.h
fragmentation.c
fragmentation.h
gateway_client.c
gateway_client.h
gateway_common.c
gateway_common.h
hard-interface.c
hard-interface.h
hash.c
hash.h
Kconfig
log.c
log.h
main.c
main.h
Makefile
multicast.c
multicast.h
netlink.c
netlink.h
network-coding.c batman-adv: fix OOB read/write in network-coding decode 2025-09-09 18:50:21 +02: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
soft-interface.h
tp_meter.c
tp_meter.h
trace.c
trace.h
translation-table.c batman-adv: Do not let TT changes list grows indefinitely 2024-12-19 18:07:19 +01:00
translation-table.h
tvlv.c
tvlv.h
types.h batman-adv: Drop unmanaged ELP metric worker 2025-03-13 12:50:51 +01:00