[syzbot] [wireless?] KASAN: slab-use-after-free Read in cmp_bss

4 views
Skip to first unread message

syzbot

unread,
Aug 11, 2025, 2:59:33 PMAug 11
to joha...@sipsolutions.net, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c30a13538d9f Merge tag 'bpf-fixes' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17840842580000
kernel config: https://syzkaller.appspot.com/x/.config?x=e143c1cd9dadd720
dashboard link: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1766fea2580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15e709a2580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-c30a1353.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8cefa7e1536e/vmlinux-c30a1353.xz
kernel image: https://storage.googleapis.com/syzbot-assets/68b8ee3da77f/bzImage-c30a1353.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+30754c...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-use-after-free in cmp_bss+0xd4d/0xe80 net/wireless/scan.c:1504
Read of size 4 at addr ffff88804b2de518 by task kworker/u4:3/38

CPU: 0 UID: 0 PID: 38 Comm: kworker/u4:3 Not tainted 6.16.0-syzkaller-12250-gc30a13538d9f #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events_unbound cfg80211_wiphy_work
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
cmp_bss+0xd4d/0xe80 net/wireless/scan.c:1504
rb_find_bss net/wireless/scan.c:1693 [inline]
__cfg80211_bss_update+0xdb/0x2120 net/wireless/scan.c:1980
cfg80211_inform_single_bss_data+0xba9/0x1ac0 net/wireless/scan.c:2375
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3234
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3325
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_rx_bss_info+0x176/0x280 net/mac80211/mlme.c:6564
ieee80211_rx_mgmt_probe_resp net/mac80211/mlme.c:6607 [inline]
ieee80211_sta_rx_queued_mgmt+0x1294/0x4470 net/mac80211/mlme.c:8089
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>

Allocated by task 3103:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4365 [inline]
__kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4377
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
cfg80211_inform_single_bss_data+0x905/0x1ac0 net/wireless/scan.c:2351
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3234
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3325
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_rx_bss_info+0x176/0x280 net/mac80211/mlme.c:6564
ieee80211_rx_mgmt_beacon+0x197d/0x2cd0 net/mac80211/mlme.c:7513
ieee80211_sta_rx_queued_mgmt+0x4ed/0x4470 net/mac80211/mlme.c:8085
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Freed by task 38:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:243 [inline]
__kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free_freelist_hook mm/slub.c:2446 [inline]
slab_free_bulk mm/slub.c:4704 [inline]
kmem_cache_free_bulk+0x2d1/0x520 mm/slub.c:5283
kfree_bulk include/linux/slab.h:794 [inline]
kvfree_rcu_bulk+0xe5/0x1f0 mm/slab_common.c:1516
kfree_rcu_work+0xed/0x170 mm/slab_common.c:1594
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548
kvfree_call_rcu+0xbb/0x410 mm/slab_common.c:1962
cfg80211_update_known_bss+0x454/0x1330 net/wireless/scan.c:1919
cfg80211_update_assoc_bss_entry+0x4ba/0x6a0 net/wireless/scan.c:3454
cfg80211_ch_switch_notify+0x3c1/0x780 net/wireless/nl80211.c:20398
ieee80211_sta_process_chanswitch+0xad4/0x2870 net/mac80211/mlme.c:-1
ieee80211_rx_mgmt_beacon+0x19c7/0x2cd0 net/mac80211/mlme.c:7515
ieee80211_sta_rx_queued_mgmt+0x4ed/0x4470 net/mac80211/mlme.c:8085
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

The buggy address belongs to the object at ffff88804b2de500
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 24 bytes inside of
freed 96-byte region [ffff88804b2de500, ffff88804b2de560)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4b2de
anon flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000000 ffff88801a441280 ffffea00010fab80 dead000000000005
raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 3103, tgid 3103 (kworker/u4:12), ts 130328667868, free_ts 130314026448
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
alloc_slab_page mm/slub.c:2489 [inline]
allocate_slab+0x65/0x370 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
__do_kmalloc_node mm/slub.c:4364 [inline]
__kmalloc_node_noprof+0x2fd/0x4e0 mm/slub.c:4371
kmalloc_array_node_noprof include/linux/slab.h:1020 [inline]
alloc_slab_obj_exts mm/slub.c:2028 [inline]
account_slab mm/slub.c:2614 [inline]
allocate_slab+0x16a/0x370 mm/slub.c:2674
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4236
dst_alloc+0x105/0x170 net/core/dst.c:89
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x420 net/ipv6/route.c:3324
ndisc_send_skb+0x41f/0x1440 net/ipv6/ndisc.c:491
addrconf_dad_completed+0x7ae/0xd60 net/ipv6/addrconf.c:4360
addrconf_dad_work+0xc36/0x14b0 net/ipv6/addrconf.c:-1
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
page last free pid 5457 tgid 5457 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
tlb_batch_list_free mm/mmu_gather.c:159 [inline]
tlb_finish_mmu+0x112/0x1d0 mm/mmu_gather.c:500
exit_mmap+0x44c/0xb50 mm/mmap.c:1293
__mmput+0x118/0x430 kernel/fork.c:1129
exit_mm+0x1da/0x2c0 kernel/exit.c:582
do_exit+0x648/0x2300 kernel/exit.c:949
do_group_exit+0x21c/0x2d0 kernel/exit.c:1102
get_signal+0x1286/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:40
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
ffff88804b2de400: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff88804b2de480: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
>ffff88804b2de500: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff88804b2de580: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
ffff88804b2de600: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Edward Adam Davis

unread,
Aug 11, 2025, 9:17:06 PMAug 11
to syzbot+30754c...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
#syz test

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index a8339ed52404..dcf7cfb9ba6b 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1917,6 +1917,7 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,

f = rcu_access_pointer(new->pub.beacon_ies);
kfree_rcu((struct cfg80211_bss_ies *)f, rcu_head);
+ RCU_INIT_POINTER(new->pub.beacon_ies, NULL);
return false;
}


syzbot

unread,
Aug 11, 2025, 9:39:04 PMAug 11
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: slab-use-after-free Read in cmp_bss

==================================================================
BUG: KASAN: slab-use-after-free in cmp_bss+0xd4d/0xe80 net/wireless/scan.c:1504
Read of size 4 at addr ffff888011bc6498 by task kworker/u4:4/68

CPU: 0 UID: 0 PID: 68 Comm: kworker/u4:4 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7-dirty #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events_unbound cfg80211_wiphy_work
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
cmp_bss+0xd4d/0xe80 net/wireless/scan.c:1504
rb_find_bss net/wireless/scan.c:1693 [inline]
__cfg80211_bss_update+0xdb/0x2120 net/wireless/scan.c:1981
cfg80211_inform_single_bss_data+0xba9/0x1ac0 net/wireless/scan.c:2376
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3235
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3326
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_rx_bss_info+0x176/0x280 net/mac80211/mlme.c:6564
ieee80211_rx_mgmt_probe_resp net/mac80211/mlme.c:6607 [inline]
ieee80211_sta_rx_queued_mgmt+0x1294/0x4470 net/mac80211/mlme.c:8089
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>

Allocated by task 3037:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4365 [inline]
__kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4377
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
cfg80211_inform_single_bss_data+0x905/0x1ac0 net/wireless/scan.c:2352
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3235
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3326
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_rx_bss_info+0x176/0x280 net/mac80211/mlme.c:6564
ieee80211_rx_mgmt_beacon+0x197d/0x2cd0 net/mac80211/mlme.c:7513
ieee80211_sta_rx_queued_mgmt+0x4ed/0x4470 net/mac80211/mlme.c:8085
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Freed by task 68:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:243 [inline]
__kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free_freelist_hook mm/slub.c:2446 [inline]
slab_free_bulk mm/slub.c:4704 [inline]
kmem_cache_free_bulk+0x2d1/0x520 mm/slub.c:5283
kfree_bulk include/linux/slab.h:794 [inline]
kvfree_rcu_bulk+0xe5/0x1f0 mm/slab_common.c:1516
kfree_rcu_work+0xed/0x170 mm/slab_common.c:1594
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548
kvfree_call_rcu+0xbb/0x410 mm/slab_common.c:1962
cfg80211_update_known_bss+0x450/0x1360 net/wireless/scan.c:1919
cfg80211_update_assoc_bss_entry+0x4ba/0x6a0 net/wireless/scan.c:3455
cfg80211_ch_switch_notify+0x3c1/0x780 net/wireless/nl80211.c:20398
ieee80211_sta_process_chanswitch+0xad4/0x2870 net/mac80211/mlme.c:-1
ieee80211_rx_mgmt_beacon+0x19c7/0x2cd0 net/mac80211/mlme.c:7515
ieee80211_sta_rx_queued_mgmt+0x4ed/0x4470 net/mac80211/mlme.c:8085
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

The buggy address belongs to the object at ffff888011bc6480
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 24 bytes inside of
freed 96-byte region [ffff888011bc6480, ffff888011bc64e0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11bc6
anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801a441280 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5352, tgid 5352 (syz-executor), ts 90139132069, free_ts 87371171593
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
__alloc_pages_slowpath+0x2fe/0xce0 mm/page_alloc.c:4679
__alloc_frozen_pages_noprof+0x319/0x370 mm/page_alloc.c:5161
alloc_slab_page mm/slub.c:2489 [inline]
allocate_slab+0x65/0x370 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
__kmalloc_cache_node_noprof+0x29a/0x3d0 mm/slub.c:4404
kmalloc_node_noprof include/linux/slab.h:928 [inline]
alloc_node_nr_active kernel/workqueue.c:4872 [inline]
__alloc_workqueue+0x6a4/0x1b70 kernel/workqueue.c:5726
alloc_workqueue_noprof+0xd4/0x210 kernel/workqueue.c:5786
tipc_crypto_start+0xd8/0x640 net/tipc/crypto.c:1481
tipc_init_net+0x213/0x330 net/tipc/core.c:72
ops_init+0x35c/0x5c0 net/core/net_namespace.c:136
setup_net+0x10c/0x320 net/core/net_namespace.c:438
copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570
create_new_namespaces+0x3f3/0x720 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:218
page last free pid 15 tgid 15 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0xca8/0x1770 kernel/rcu/tree.c:2861
handle_softirqs+0x283/0x870 kernel/softirq.c:579
run_ksoftirqd+0x9b/0x100 kernel/softirq.c:968
smpboot_thread_fn+0x53f/0xa60 kernel/smpboot.c:160
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Memory state around the buggy address:
ffff888011bc6380: 00 00 00 00 00 00 00 00 00 00 00 01 fc fc fc fc
ffff888011bc6400: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
>ffff888011bc6480: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff888011bc6500: 00 00 00 00 00 00 00 00 00 00 00 01 fc fc fc fc
ffff888011bc6580: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
==================================================================


Tested on:

commit: 8f5ae30d Linux 6.17-rc1
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=134c2842580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d67d3af29f50297e
dashboard link: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=14944af0580000

Hillf Danton

unread,
Aug 12, 2025, 1:08:45 AMAug 12
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
> Date: Mon, 11 Aug 2025 11:59:31 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c30a13538d9f Merge tag 'bpf-fixes' of git://git.kernel.org..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=17840842580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=e143c1cd9dadd720
> dashboard link: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
#syz test

--- x/net/wireless/scan.c
+++ y/net/wireless/scan.c
@@ -1904,19 +1904,6 @@ cfg80211_update_known_bss(struct cfg8021

if (known->pub.hidden_beacon_bss &&
!list_empty(&known->hidden_list)) {
- const struct cfg80211_bss_ies *f;
-
- /* The known BSS struct is one of the probe
- * response members of a group, but we're
- * receiving a beacon (beacon_ies in the new
- * bss is used). This can only mean that the
- * AP changed its beacon from not having an
- * SSID to showing it, which is confusing so
- * drop this information.
- */
-
- f = rcu_access_pointer(new->pub.beacon_ies);
- kfree_rcu((struct cfg80211_bss_ies *)f, rcu_head);
return false;
}

--

syzbot

unread,
Aug 12, 2025, 1:31:03 AMAug 12
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+30754c...@syzkaller.appspotmail.com
Tested-by: syzbot+30754c...@syzkaller.appspotmail.com

Tested on:

commit: 53e760d8 Merge tag 'nfsd-6.17-1' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17fe2842580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d67d3af29f50297e
dashboard link: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=12168c34580000

Note: testing is done by a robot and is best-effort only.

syzbot

unread,
Aug 12, 2025, 4:49:19 AMAug 12
to linux-...@vger.kernel.org, syzkall...@googlegroups.com
For archival purposes, forwarding an incoming command email to
linux-...@vger.kernel.org, syzkall...@googlegroups.com.

***

Subject: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 53e760d8949895390e256e723e7ee46618310361
Author: dman...@yandex.ru

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 53e760d8949895390e256e723e7ee46618310361

syzbot

unread,
Aug 12, 2025, 5:11:07 AMAug 12
to dman...@yandex.ru, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: slab-use-after-free Read in cmp_bss

==================================================================
BUG: KASAN: slab-use-after-free in cmp_bss+0xd4d/0xe80 net/wireless/scan.c:1504
Read of size 4 at addr ffff888000e6e898 by task kworker/u4:0/12

CPU: 0 UID: 0 PID: 12 Comm: kworker/u4:0 Not tainted 6.17.0-rc1-syzkaller-00004-g53e760d89498-dirty #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events_unbound cfg80211_wiphy_work
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
cmp_bss+0xd4d/0xe80 net/wireless/scan.c:1504
rb_find_bss net/wireless/scan.c:1693 [inline]
__cfg80211_bss_update+0xd6/0x2140 net/wireless/scan.c:1982
cfg80211_inform_single_bss_data+0xba9/0x1ac0 net/wireless/scan.c:2377
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3236
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3327
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_rx_bss_info+0x176/0x280 net/mac80211/mlme.c:6564
ieee80211_rx_mgmt_probe_resp net/mac80211/mlme.c:6607 [inline]
ieee80211_sta_rx_queued_mgmt+0x1294/0x4470 net/mac80211/mlme.c:8089
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>

Allocated by task 3109:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4365 [inline]
__kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4377
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
cfg80211_inform_single_bss_data+0x905/0x1ac0 net/wireless/scan.c:2353
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3236
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3327
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_rx_bss_info+0x176/0x280 net/mac80211/mlme.c:6564
ieee80211_rx_mgmt_beacon+0x197d/0x2cd0 net/mac80211/mlme.c:7513
ieee80211_sta_rx_queued_mgmt+0x4ed/0x4470 net/mac80211/mlme.c:8085
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Freed by task 3109:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:243 [inline]
__kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free_freelist_hook mm/slub.c:2446 [inline]
slab_free_bulk mm/slub.c:4704 [inline]
kmem_cache_free_bulk+0x2d1/0x520 mm/slub.c:5283
kfree_bulk include/linux/slab.h:794 [inline]
kvfree_rcu_bulk+0xe5/0x1f0 mm/slab_common.c:1516
kvfree_rcu_drain_ready mm/slab_common.c:1699 [inline]
kfree_rcu_monitor+0x211/0x2a0 mm/slab_common.c:1772
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548
kvfree_call_rcu+0xbb/0x410 mm/slab_common.c:1962
cfg80211_update_known_bss+0x9e8/0x13d0 net/wireless/scan.c:1921
cfg80211_update_assoc_bss_entry+0x4ba/0x6a0 net/wireless/scan.c:3456
cfg80211_ch_switch_notify+0x3c1/0x780 net/wireless/nl80211.c:20398
ieee80211_sta_process_chanswitch+0xad4/0x2870 net/mac80211/mlme.c:-1
ieee80211_rx_mgmt_beacon+0x19c7/0x2cd0 net/mac80211/mlme.c:7515
ieee80211_sta_rx_queued_mgmt+0x4ed/0x4470 net/mac80211/mlme.c:8085
ieee80211_iface_process_skb net/mac80211/iface.c:1696 [inline]
ieee80211_iface_work+0x652/0x12d0 net/mac80211/iface.c:1753
cfg80211_wiphy_work+0x2b8/0x470 net/wireless/core.c:435
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

The buggy address belongs to the object at ffff888000e6e880
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 24 bytes inside of
freed 96-byte region [ffff888000e6e880, ffff888000e6e8e0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe6e
flags: 0x7ff00000000000(node=0|zone=0|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 007ff00000000000 ffff88801a441280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 3109, tgid 3109 (kworker/u4:11), ts 107292613223, free_ts 31900007900
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
alloc_slab_page mm/slub.c:2489 [inline]
allocate_slab+0x65/0x370 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
__do_kmalloc_node mm/slub.c:4364 [inline]
__kmalloc_node_noprof+0x2fd/0x4e0 mm/slub.c:4371
kmalloc_array_node_noprof include/linux/slab.h:1020 [inline]
alloc_slab_obj_exts mm/slub.c:2028 [inline]
account_slab mm/slub.c:2614 [inline]
allocate_slab+0x16a/0x370 mm/slub.c:2674
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4236
dst_alloc+0x105/0x170 net/core/dst.c:89
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x420 net/ipv6/route.c:3324
mld_sendpack+0x678/0xd80 net/ipv6/mcast.c:1849
ipv6_mc_dad_complete+0x88/0x410 net/ipv6/mcast.c:2284
addrconf_dad_completed+0x6d5/0xd60 net/ipv6/addrconf.c:4340
addrconf_dad_work+0xc36/0x14b0 net/ipv6/addrconf.c:-1
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
page last free pid 4756 tgid 4756 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0xca8/0x1770 kernel/rcu/tree.c:2861
handle_softirqs+0x283/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702

Memory state around the buggy address:
ffff888000e6e780: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
ffff888000e6e800: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
>ffff888000e6e880: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff888000e6e900: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff888000e6e980: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================


Tested on:

commit: 53e760d8 Merge tag 'nfsd-6.17-1' of git://git.kernel.o..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=10c54af0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d67d3af29f50297e
dashboard link: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=15ffe5a2580000

syzbot

unread,
Aug 12, 2025, 7:53:11 AMAug 12
to linux-...@vger.kernel.org, syzkall...@googlegroups.com

syzbot

unread,
Aug 12, 2025, 8:19:04 AMAug 12
to dman...@yandex.ru, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+30754c...@syzkaller.appspotmail.com
Tested-by: syzbot+30754c...@syzkaller.appspotmail.com

Tested on:

commit: 53e760d8 Merge tag 'nfsd-6.17-1' of git://git.kernel.o..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=152b4af0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d67d3af29f50297e
dashboard link: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=15e135a2580000
Reply all
Reply to author
Forward
0 new messages