syzbot


KASAN: use-after-free Read in process_srcu

Status: premoderation: reported on 2025/08/27 10:27
Reported-by: syzbot+88238368b62600a86a74@syzkaller.appspotmail.com
First crash: 4d02h, last: 4d02h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in process_srcu kernel 8 1 177d 173d 0/29 auto-obsoleted due to no activity on 2025/06/05 10:52
upstream KMSAN: uninit-value in process_srcu block 7 3 873d 915d 0/29 auto-obsoleted due to no activity on 2023/07/10 12:54
upstream KASAN: slab-use-after-free Read in process_srcu kernel 19 3 455d 468d 0/29 auto-obsoleted due to no activity on 2024/08/30 14:51

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __list_add_valid+0x6b/0xf0 lib/list_debug.c:30
Read of size 8 at addr ffff8881015e2c68 by task kworker/0:0/6

CPU: 0 PID: 6 Comm: kworker/0:0 Not tainted 5.15.189-syzkaller-android13-5.15.189_r00 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: rcu_gp process_srcu
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0xf1/0x140 mm/kasan/report.c:444
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 __list_add_valid+0x6b/0xf0 lib/list_debug.c:30
 __list_add include/linux/list.h:67 [inline]
 list_add_tail include/linux/list.h:100 [inline]
 insert_work+0x109/0x310 kernel/workqueue.c:1377
 __queue_work+0x8e5/0xc60 kernel/workqueue.c:1539
 queue_work_on+0xd2/0x140 kernel/workqueue.c:1566
 srcu_queue_delayed_work_on kernel/rcu/srcutree.c:466 [inline]
 srcu_schedule_cbs_sdp kernel/rcu/srcutree.c:479 [inline]
 srcu_schedule_cbs_snp kernel/rcu/srcutree.c:496 [inline]
 srcu_gp_end kernel/rcu/srcutree.c:555 [inline]
 srcu_advance_state kernel/rcu/srcutree.c:1231 [inline]
 process_srcu+0x716/0xcb0 kernel/rcu/srcutree.c:1325
 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
 kthread+0x411/0x500 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Allocated by task 6:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 ____kasan_kmalloc mm/kasan/common.c:512 [inline]
 __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:521
 kasan_kmalloc include/linux/kasan.h:227 [inline]
 __kmalloc+0x13d/0x2c0 mm/slub.c:4431
 __kmalloc_node include/linux/slab.h:484 [inline]
 kmalloc_node include/linux/slab.h:639 [inline]
 kvmalloc_node+0x206/0x300 mm/util.c:621
 kvmalloc include/linux/mm.h:851 [inline]
 kvzalloc include/linux/mm.h:859 [inline]
 alloc_netdev_mqs+0x8d/0xc90 net/core/dev.c:10900
 alloc_etherdev_mqs+0x34/0x40 net/ethernet/eth.c:383
 usbnet_probe+0x219/0x2860 drivers/net/usb/usbnet.c:1723
 usb_probe_interface+0x5ff/0xae0 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x285/0x970 drivers/base/dd.c:595
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:755
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785
 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:979
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489
 device_add+0xb31/0xed0 drivers/base/core.c:3422
 usb_set_configuration+0x19c2/0x1f10 drivers/usb/core/message.c:2165
 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x148/0x260 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x285/0x970 drivers/base/dd.c:595
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:755
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785
 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:979
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489
 device_add+0xb31/0xed0 drivers/base/core.c:3422
 usb_new_device+0xd06/0x1620 drivers/usb/core/hub.c:2610
 hub_port_connect drivers/usb/core/hub.c:5525 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5665 [inline]
 port_event drivers/usb/core/hub.c:5815 [inline]
 hub_event+0x27d8/0x42c0 drivers/usb/core/hub.c:5897
 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
 kthread+0x411/0x500 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Freed by task 1157:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
 kasan_slab_free include/linux/kasan.h:193 [inline]
 slab_free_hook mm/slub.c:1723 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749
 slab_free mm/slub.c:3521 [inline]
 kfree+0xc4/0x270 mm/slub.c:4583
 kvfree+0x35/0x40 mm/util.c:661
 netdev_freemem+0x3f/0x60 net/core/dev.c:10854
 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1903
 device_release+0x96/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:713 [inline]
 kobject_release lib/kobject.c:744 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x18a/0x270 lib/kobject.c:761
 put_device+0x1f/0x30 drivers/base/core.c:3530
 free_netdev+0x34b/0x450 net/core/dev.c:11040
 usbnet_disconnect+0x24b/0x3a0 drivers/net/usb/usbnet.c:1662
 usb_unbind_interface+0x212/0x8c0 drivers/usb/core/driver.c:458
 __device_release_driver drivers/base/dd.c:1229 [inline]
 device_release_driver_internal+0x4c1/0x760 drivers/base/dd.c:1262
 device_release_driver+0x19/0x20 drivers/base/dd.c:1285
 bus_remove_device+0x2dd/0x340 drivers/base/bus.c:531
 device_del+0x696/0xe90 drivers/base/core.c:3610
 usb_disable_device+0x3a8/0x750 drivers/usb/core/message.c:1414
 usb_disconnect+0x31e/0x850 drivers/usb/core/hub.c:2260
 hub_port_connect drivers/usb/core/hub.c:5364 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5665 [inline]
 port_event drivers/usb/core/hub.c:5815 [inline]
 hub_event+0x190c/0x42c0 drivers/usb/core/hub.c:5897
 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
 kthread+0x411/0x500 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
 insert_work+0x51/0x310 kernel/workqueue.c:1373
 __queue_work+0x8e5/0xc60 kernel/workqueue.c:1539
 queue_work_on+0xd2/0x140 kernel/workqueue.c:1566
 queue_work include/linux/workqueue.h:510 [inline]
 schedule_work include/linux/workqueue.h:571 [inline]
 usbnet_defer_kevent drivers/net/usb/usbnet.c:482 [inline]
 usbnet_link_change+0x176/0x1a0 drivers/net/usb/usbnet.c:-1
 usbnet_probe+0x1dfd/0x2860 drivers/net/usb/usbnet.c:1868
 usb_probe_interface+0x5ff/0xae0 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x285/0x970 drivers/base/dd.c:595
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:755
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785
 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:979
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489
 device_add+0xb31/0xed0 drivers/base/core.c:3422
 usb_set_configuration+0x19c2/0x1f10 drivers/usb/core/message.c:2165
 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x148/0x260 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x285/0x970 drivers/base/dd.c:595
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:755
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785
 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:979
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489
 device_add+0xb31/0xed0 drivers/base/core.c:3422
 usb_new_device+0xd06/0x1620 drivers/usb/core/hub.c:2610
 hub_port_connect drivers/usb/core/hub.c:5525 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5665 [inline]
 port_event drivers/usb/core/hub.c:5815 [inline]
 hub_event+0x27d8/0x42c0 drivers/usb/core/hub.c:5897
 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
 kthread+0x411/0x500 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff8881015e2000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 3176 bytes inside of
 4096-byte region [ffff8881015e2000, ffff8881015e3000)
The buggy address belongs to the page:
page:ffffea0004057800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1015e0
head:ffffea0004057800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 0000000300000001 ffff888100043380
raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd60c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 284, ts 23285070309, free_ts 23274487010
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485
 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5795
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1932 [inline]
 new_slab+0xa1/0x4d0 mm/slub.c:1995
 ___slab_alloc+0x381/0x810 mm/slub.c:3028
 __slab_alloc+0x49/0x90 mm/slub.c:3115
 slab_alloc_node mm/slub.c:3206 [inline]
 slab_alloc mm/slub.c:3250 [inline]
 __kmalloc+0x16a/0x2c0 mm/slub.c:4427
 __kmalloc_node include/linux/slab.h:484 [inline]
 kmalloc_node include/linux/slab.h:639 [inline]
 kvmalloc_node+0x206/0x300 mm/util.c:621
 kvmalloc include/linux/mm.h:851 [inline]
 kvzalloc include/linux/mm.h:859 [inline]
 alloc_netdev_mqs+0x8d/0xc90 net/core/dev.c:10900
 rtnl_create_link+0x2ef/0x9d0 net/core/rtnetlink.c:3232
 __rtnl_newlink net/core/rtnetlink.c:3514 [inline]
 rtnl_newlink+0x103f/0x17b0 net/core/rtnetlink.c:3572
 rtnetlink_rcv_msg+0x9e4/0xb90 net/core/rtnetlink.c:5650
 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2511
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5668
 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline]
 netlink_unicast+0x876/0xa40 net/netlink/af_netlink.c:1348
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1472 [inline]
 free_pcp_prepare mm/page_alloc.c:1544 [inline]
 free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534
 free_unref_page+0xa2/0x550 mm/page_alloc.c:3616
 free_the_page mm/page_alloc.c:805 [inline]
 __free_pages+0x6c/0x100 mm/page_alloc.c:5871
 __free_slab+0xe8/0x1e0 mm/slub.c:2020
 free_slab mm/slub.c:2035 [inline]
 discard_slab mm/slub.c:2041 [inline]
 __unfreeze_partials+0x160/0x190 mm/slub.c:2527
 put_cpu_partial+0xc6/0x120 mm/slub.c:2607
 __slab_free+0x1d4/0x290 mm/slub.c:3390
 do_slab_free mm/slub.c:3509 [inline]
 ___cache_free+0x104/0x120 mm/slub.c:3530
 qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157
 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xf0 mm/kasan/common.c:443
 kasan_slab_alloc include/linux/kasan.h:217 [inline]
 slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550
 slab_alloc_node mm/slub.c:3240 [inline]
 slab_alloc mm/slub.c:3250 [inline]
 __kmalloc_track_caller+0x11f/0x2c0 mm/slub.c:4949
 kvasprintf+0xd4/0x180 lib/kasprintf.c:25
 kvasprintf_const+0xf2/0x240 lib/kasprintf.c:49

Memory state around the buggy address:
 ffff8881015e2b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881015e2b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881015e2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                          ^
 ffff8881015e2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881015e2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/27 10:26 android13-5.15-lts f32b52534f1d e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in process_srcu
* Struck through repros no longer work on HEAD.