milos-linux/net/ieee802154
Eric Dumazet 3a5f3f7aff ieee802154: 6lowpan: only accept IPv6 packets in lowpan_xmit()
The aoe driver (or similar) generates a non-IPv6 packet
(e.g., ETH_P_AOE) and queues it for transmission via dev_queue_xmit()
on a 6LoWPAN interface (configured by the user or test case).

Since the packet is not IPv6, the 6LoWPAN header_ops->create function
(lowpan_header_create or header_create) returns early without initializing
the lowpan_addr_info structure in the skb headroom.

In the transmit function (lowpan_xmit), the driver calls lowpan_header
(or setup_header) which unconditionally copies and uses the lowpan_addr_info
from the headroom, which contains uninitialized data.

Fix this by dropping non IPv6 packets.

A similar fix is needed in net/bluetooth/6lowpan.c bt_xmit().

Fixes: 4dc315e267 ("ieee802154: 6lowpan: move transmit functionality")
Reported-by: syzbot+f13c19f75e1097abd116@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6a1fd763.278b5b03.2bcf39.0049.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20260603072955.4032221-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-04 08:51:32 -07:00
..
6lowpan ieee802154: 6lowpan: only accept IPv6 packets in lowpan_xmit() 2026-06-04 08:51:32 -07:00
core.c net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
core.h
header_ops.c mac802154: Handle received BEACON_REQ 2023-03-23 21:51:30 +01:00
ieee802154.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ieee802154: Internal PAN management 2023-11-20 11:41:06 +01:00
netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
nl-mac.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
nl-phy.c net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
nl802154.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nl802154.h ieee802154: Add support for user beaconing requests 2023-01-28 13:51:22 +01:00
nl_policy.c nl802154: add missing attribute validation for dev_type 2020-03-03 13:28:48 -08:00
pan.c mac802154: Avoid new associations while disassociating 2023-12-15 11:14:57 +01:00
rdev-ops.h ieee802154: Add support for user disassociation requests 2023-11-20 11:42:47 +01:00
socket.c net: remove addr_len argument of recvmsg() handlers 2026-03-02 18:17:17 -08:00
sysfs.c ieee802154: cfg802154: make wpan_phy_class constant 2024-03-06 21:23:10 +01:00
sysfs.h ieee802154: cfg802154: make wpan_phy_class constant 2024-03-06 21:23:10 +01:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00