]> git.ipfire.org Git - thirdparty/linux.git/commit
ieee802154: 6lowpan: only accept IPv6 packets in lowpan_xmit()
authorEric Dumazet <edumazet@google.com>
Wed, 3 Jun 2026 07:29:55 +0000 (07:29 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jun 2026 15:51:32 +0000 (08:51 -0700)
commit3a5f3f7aff18bcc36a57839cf50cf0cc8de707f3
tree89b3ec6a668e5b39e87ae933afcd3a3a6f8a5896
parent791c91dc7a9dfb2457d5e29b8216a6484b9c4b40
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: 4dc315e267fe ("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>
net/ieee802154/6lowpan/tx.c