syzbot


KMSAN: uninit-value in cfg80211_inform_bss_frame_data

Status: fixed on 2024/08/23 02:59
Subsystems: wireless
[Documentation on labels]
Reported-by: syzbot+0f3afa93b91202f21939@syzkaller.appspotmail.com
Fix commit: 6873cc441607 wifi: cfg80211: correct S1G beacon length calculation
First crash: 133d, last: 123d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH wireless] wifi: cfg80211: correct S1G beacon length calculation 1 (1) 2024/07/24 11:29
[syzbot] [wireless?] KMSAN: uninit-value in cfg80211_inform_bss_frame_data 0 (1) 2024/07/24 09:56
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in cfg80211_inform_bss_frame_data wireless 1 706d 700d 0/28 auto-obsoleted due to no activity on 2023/04/26 05:23

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in cfg80211_find_elem_match net/wireless/scan.c:1364 [inline]
BUG: KMSAN: uninit-value in cfg80211_find_elem include/net/cfg80211.h:6858 [inline]
BUG: KMSAN: uninit-value in cfg80211_inform_bss_frame_data+0x3e3/0x9e0 net/wireless/scan.c:3225
 cfg80211_find_elem_match net/wireless/scan.c:1364 [inline]
 cfg80211_find_elem include/net/cfg80211.h:6858 [inline]
 cfg80211_inform_bss_frame_data+0x3e3/0x9e0 net/wireless/scan.c:3225
 ieee80211_bss_info_update+0x900/0xad0 net/mac80211/scan.c:226
 ieee80211_scan_rx+0x8f6/0xbd0 net/mac80211/scan.c:340
 __ieee80211_rx_handle_packet net/mac80211/rx.c:5225 [inline]
 ieee80211_rx_list+0x55c9/0x6690 net/mac80211/rx.c:5462
 ieee80211_rx_napi+0x84/0x3f0 net/mac80211/rx.c:5485
 ieee80211_rx include/net/mac80211.h:5124 [inline]
 ieee80211_handle_queued_frames+0x1a8/0x340 net/mac80211/main.c:439
 ieee80211_tasklet_handler+0x25/0x30 net/mac80211/main.c:458
 tasklet_action_common+0x395/0xd50 kernel/softirq.c:785
 tasklet_action+0x2d/0x40 kernel/softirq.c:811
 handle_softirqs+0x1ce/0x800 kernel/softirq.c:554
 __do_softirq+0x14/0x1a kernel/softirq.c:588
 do_softirq+0x9a/0x100 kernel/softirq.c:455
 __local_bh_enable_ip+0x9f/0xb0 kernel/softirq.c:382
 local_bh_enable include/linux/bottom_half.h:33 [inline]
 rcu_read_unlock_bh include/linux/rcupdate.h:908 [inline]
 __dev_queue_xmit+0x2692/0x5610 net/core/dev.c:4450
 dev_queue_xmit include/linux/netdevice.h:3105 [inline]
 __netlink_deliver_tap_skb net/netlink/af_netlink.c:307 [inline]
 __netlink_deliver_tap+0x84c/0xc90 net/netlink/af_netlink.c:325
 netlink_deliver_tap net/netlink/af_netlink.c:338 [inline]
 __netlink_sendskb net/netlink/af_netlink.c:1275 [inline]
 netlink_sendskb+0x23c/0x270 net/netlink/af_netlink.c:1284
 netlink_unicast+0x70e/0x1260 net/netlink/af_netlink.c:1372
 nlmsg_unicast include/net/netlink.h:1158 [inline]
 netlink_ack+0xb04/0xe80 net/netlink/af_netlink.c:2512
 netlink_rcv_skb+0x510/0x650 net/netlink/af_netlink.c:2556
 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x30f/0x380 net/socket.c:745
 __sys_sendto+0x685/0x830 net/socket.c:2204
 __do_sys_sendto net/socket.c:2216 [inline]
 __se_sys_sendto net/socket.c:2212 [inline]
 __x64_sys_sendto+0x125/0x1d0 net/socket.c:2212
 x64_sys_call+0x3799/0x3c10 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:3994 [inline]
 slab_alloc_node mm/slub.c:4037 [inline]
 kmem_cache_alloc_node_noprof+0x6bf/0xb80 mm/slub.c:4080
 kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:583
 __alloc_skb+0x363/0x7b0 net/core/skbuff.c:674
 alloc_skb include/linux/skbuff.h:1320 [inline]
 hwsim_cloned_frame_received_nl+0x311/0x1360 drivers/net/wireless/virtual/mac80211_hwsim.c:5850
 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
 genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210
 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2550
 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x30f/0x380 net/socket.c:745
 __sys_sendto+0x685/0x830 net/socket.c:2204
 __do_sys_sendto net/socket.c:2216 [inline]
 __se_sys_sendto net/socket.c:2212 [inline]
 __x64_sys_sendto+0x125/0x1d0 net/socket.c:2212
 x64_sys_call+0x3799/0x3c10 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 UID: 0 PID: 11921 Comm: syz.0.1823 Not tainted 6.11.0-rc1-syzkaller-00062-ge4fc196f5ba3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
=====================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/01 02:31 upstream e4fc196f5ba3 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in cfg80211_inform_bss_frame_data
2024/07/22 23:27 upstream 933069701c1b f063dfd9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in cfg80211_inform_bss_frame_data
2024/07/22 18:53 upstream 933069701c1b f063dfd9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in cfg80211_inform_bss_frame_data
2024/08/01 05:30 upstream e4fc196f5ba3 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in cfg80211_inform_bss_frame_data
2024/08/01 05:30 upstream e4fc196f5ba3 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in cfg80211_inform_bss_frame_data
2024/07/26 14:40 upstream 1722389b0d86 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in cfg80211_inform_bss_frame_data
* Struck through repros no longer work on HEAD.