syzbot


KMSAN: uninit-value in _ieee802_11_parse_elems_crc

Status: fixed on 2022/03/08 16:11
Subsystems: wireless
[Documentation on labels]
Reported-by: syzbot+59bdff68edce82e393b6@syzkaller.appspotmail.com
Fix commit: 768c0b19b506 mac80211: validate extended element ID is present
First crash: 845d, last: 845d
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 4.19 00/56] 4.19.222-rc1 review 66 (66) 2021/12/22 07:54
[PATCH 5.15 000/177] 5.15.11-rc1 review 183 (183) 2021/12/21 23:14
[PATCH 5.10 00/99] 5.10.88-rc1 review 106 (106) 2021/12/21 23:13
[PATCH 5.4 00/71] 5.4.168-rc1 review 78 (78) 2021/12/21 23:13
[PATCH] mac80211: validate extended element ID is present 1 (1) 2021/12/11 19:10
[syzbot] KMSAN: uninit-value in _ieee802_11_parse_elems_crc 0 (1) 2021/12/10 13:09

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in ieee80211_parse_extension_element net/mac80211/util.c:948 [inline]
BUG: KMSAN: uninit-value in _ieee802_11_parse_elems_crc+0x3448/0x4310 net/mac80211/util.c:1348
 ieee80211_parse_extension_element net/mac80211/util.c:948 [inline]
 _ieee802_11_parse_elems_crc+0x3448/0x4310 net/mac80211/util.c:1348
 ieee802_11_parse_elems_crc+0x17e3/0x1e30 net/mac80211/util.c:1490
 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2208 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1605 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x7e5/0x4350 net/mac80211/ibss.c:1639
 ieee80211_iface_process_skb net/mac80211/iface.c:1468 [inline]
 ieee80211_iface_work+0xeda/0x1990 net/mac80211/iface.c:1522
 process_one_work+0xdc2/0x1820 kernel/workqueue.c:2298
 worker_thread+0x10f1/0x2290 kernel/workqueue.c:2445
 kthread+0x721/0x850 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

Uninit was created at:
 slab_post_alloc_hook mm/slab.h:524 [inline]
 slab_alloc_node mm/slub.c:3251 [inline]
 __kmalloc_node_track_caller+0xe0c/0x1510 mm/slub.c:4974
 kmalloc_reserve net/core/skbuff.c:354 [inline]
 __alloc_skb+0x545/0xf90 net/core/skbuff.c:426
 skb_copy+0x191/0xb90 net/core/skbuff.c:1586
 mac80211_hwsim_tx_frame_no_nl+0x1fcf/0x2c00 drivers/net/wireless/mac80211_hwsim.c:1565
 mac80211_hwsim_tx+0x10d3/0x1760 drivers/net/wireless/mac80211_hwsim.c:1669
 drv_tx net/mac80211/driver-ops.h:35 [inline]
 ieee80211_tx_frags+0x7bf/0x1250 net/mac80211/tx.c:1714
 __ieee80211_tx+0x5a8/0x7d0 net/mac80211/tx.c:1768
 ieee80211_tx+0x776/0x790 net/mac80211/tx.c:1948
 ieee80211_xmit+0x849/0x890 net/mac80211/tx.c:2040
 __ieee80211_tx_skb_tid_band+0x297/0x3a0 net/mac80211/tx.c:5701
 ieee80211_tx_skb_tid net/mac80211/ieee80211_i.h:2186 [inline]
 ieee80211_tx_skb net/mac80211/ieee80211_i.h:2195 [inline]
 ieee80211_mgmt_tx+0x1721/0x1d00 net/mac80211/offchannel.c:927
 rdev_mgmt_tx+0x117/0x4e0 net/wireless/rdev-ops.h:742
 cfg80211_mlme_mgmt_tx+0x910/0x1330 net/wireless/mlme.c:759
 nl80211_tx_mgmt+0x112a/0x1870 net/wireless/nl80211.c:11708
 genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
 genl_rcv_msg+0x157f/0x1660 net/netlink/genetlink.c:792
 netlink_rcv_skb+0x447/0x800 net/netlink/af_netlink.c:2491
 genl_rcv+0x63/0x80 net/netlink/genetlink.c:803
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x1095/0x1360 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x16f3/0x1870 net/netlink/af_netlink.c:1916
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 ____sys_sendmsg+0xe11/0x12c0 net/socket.c:2409
 ___sys_sendmsg net/socket.c:2463 [inline]
 __sys_sendmsg+0x4a5/0x640 net/socket.c:2492
 __do_sys_sendmsg net/socket.c:2501 [inline]
 __se_sys_sendmsg net/socket.c:2499 [inline]
 __x64_sys_sendmsg+0xe2/0x120 net/socket.c:2499
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x44/0xae
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/03 20:49 https://github.com/google/kmsan.git master 093998ececa3 c7c20675 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in _ieee802_11_parse_elems_crc
* Struck through repros no longer work on HEAD.