Hay
Date
July 15, 2025, 11:35 a.m.

Environment
e850-96
qemu-arm64
qemu-x86_64

[   50.005093] ==================================================================
[   50.012380] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8
[   50.019058] Read of size 8 at addr ffff000808530100 by task kunit_try_catch/281
[   50.026347] 
[   50.027834] CPU: 3 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250715 #1 PREEMPT 
[   50.027898] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.027915] Hardware name: WinLink E850-96 board (DT)
[   50.027937] Call trace:
[   50.027954]  show_stack+0x20/0x38 (C)
[   50.027989]  dump_stack_lvl+0x8c/0xd0
[   50.028025]  print_report+0x118/0x5d0
[   50.028052]  kasan_report+0xdc/0x128
[   50.028078]  __asan_report_load8_noabort+0x20/0x30
[   50.028112]  workqueue_uaf+0x480/0x4a8
[   50.028142]  kunit_try_run_case+0x170/0x3f0
[   50.028174]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.028212]  kthread+0x328/0x630
[   50.028242]  ret_from_fork+0x10/0x20
[   50.028274] 
[   50.091453] Allocated by task 281:
[   50.094839]  kasan_save_stack+0x3c/0x68
[   50.098655]  kasan_save_track+0x20/0x40
[   50.102476]  kasan_save_alloc_info+0x40/0x58
[   50.106728]  __kasan_kmalloc+0xd4/0xd8
[   50.110460]  __kmalloc_cache_noprof+0x16c/0x3c0
[   50.114974]  workqueue_uaf+0x13c/0x4a8
[   50.118706]  kunit_try_run_case+0x170/0x3f0
[   50.122873]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.128342]  kthread+0x328/0x630
[   50.131553]  ret_from_fork+0x10/0x20
[   50.135112] 
[   50.136589] Freed by task 9:
[   50.139456]  kasan_save_stack+0x3c/0x68
[   50.143272]  kasan_save_track+0x20/0x40
[   50.147092]  kasan_save_free_info+0x4c/0x78
[   50.151258]  __kasan_slab_free+0x6c/0x98
[   50.155165]  kfree+0x214/0x3c8
[   50.158203]  workqueue_uaf_work+0x18/0x30
[   50.162195]  process_one_work+0x530/0xf98
[   50.166189]  worker_thread+0x618/0xf38
[   50.169921]  kthread+0x328/0x630
[   50.173133]  ret_from_fork+0x10/0x20
[   50.176691] 
[   50.178169] Last potentially related work creation:
[   50.183031]  kasan_save_stack+0x3c/0x68
[   50.186848]  kasan_record_aux_stack+0xb4/0xc8
[   50.191188]  __queue_work+0x65c/0xfe0
[   50.194833]  queue_work_on+0xbc/0xf8
[   50.198393]  workqueue_uaf+0x210/0x4a8
[   50.202126]  kunit_try_run_case+0x170/0x3f0
[   50.206292]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.211761]  kthread+0x328/0x630
[   50.214972]  ret_from_fork+0x10/0x20
[   50.218531] 
[   50.220007] The buggy address belongs to the object at ffff000808530100
[   50.220007]  which belongs to the cache kmalloc-32 of size 32
[   50.232337] The buggy address is located 0 bytes inside of
[   50.232337]  freed 32-byte region [ffff000808530100, ffff000808530120)
[   50.244312] 
[   50.245792] The buggy address belongs to the physical page:
[   50.251348] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x888530
[   50.259332] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   50.265841] page_type: f5(slab)
[   50.268978] raw: 0bfffe0000000000 ffff000800002780 dead000000000122 0000000000000000
[   50.276696] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   50.284419] page dumped because: kasan: bad access detected
[   50.289971] 
[   50.291446] Memory state around the buggy address:
[   50.296227]  ffff000808530000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   50.303429]  ffff000808530080: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc
[   50.310634] >ffff000808530100: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   50.317835]                    ^
[   50.321051]  ffff000808530180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   50.328257]  ffff000808530200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   50.335457] ==================================================================

[   30.992453] ==================================================================
[   30.992615] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8
[   30.992675] Read of size 8 at addr fff00000c6500e00 by task kunit_try_catch/232
[   30.992726] 
[   30.992762] CPU: 0 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250715 #1 PREEMPT 
[   30.992850] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.992877] Hardware name: linux,dummy-virt (DT)
[   30.992915] Call trace:
[   30.993038]  show_stack+0x20/0x38 (C)
[   30.993285]  dump_stack_lvl+0x8c/0xd0
[   30.993367]  print_report+0x118/0x5d0
[   30.993410]  kasan_report+0xdc/0x128
[   30.993468]  __asan_report_load8_noabort+0x20/0x30
[   30.993684]  workqueue_uaf+0x480/0x4a8
[   30.993730]  kunit_try_run_case+0x170/0x3f0
[   30.993777]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.993830]  kthread+0x328/0x630
[   30.994119]  ret_from_fork+0x10/0x20
[   30.994407] 
[   30.994430] Allocated by task 232:
[   30.994471]  kasan_save_stack+0x3c/0x68
[   30.994518]  kasan_save_track+0x20/0x40
[   30.994558]  kasan_save_alloc_info+0x40/0x58
[   30.994594]  __kasan_kmalloc+0xd4/0xd8
[   30.994633]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.994913]  workqueue_uaf+0x13c/0x4a8
[   30.994960]  kunit_try_run_case+0x170/0x3f0
[   30.994996]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.995119]  kthread+0x328/0x630
[   30.995225]  ret_from_fork+0x10/0x20
[   30.995325] 
[   30.995400] Freed by task 76:
[   30.995428]  kasan_save_stack+0x3c/0x68
[   30.995585]  kasan_save_track+0x20/0x40
[   30.995628]  kasan_save_free_info+0x4c/0x78
[   30.995664]  __kasan_slab_free+0x6c/0x98
[   30.996105]  kfree+0x214/0x3c8
[   30.996141]  workqueue_uaf_work+0x18/0x30
[   30.996180]  process_one_work+0x530/0xf98
[   30.996219]  worker_thread+0x618/0xf38
[   30.996257]  kthread+0x328/0x630
[   30.996290]  ret_from_fork+0x10/0x20
[   30.996327] 
[   30.996348] Last potentially related work creation:
[   30.996374]  kasan_save_stack+0x3c/0x68
[   30.996423]  kasan_record_aux_stack+0xb4/0xc8
[   30.996474]  __queue_work+0x65c/0xfe0
[   30.996890]  queue_work_on+0xbc/0xf8
[   30.997166]  workqueue_uaf+0x210/0x4a8
[   30.997205]  kunit_try_run_case+0x170/0x3f0
[   30.997243]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.997288]  kthread+0x328/0x630
[   30.997320]  ret_from_fork+0x10/0x20
[   30.997365] 
[   30.997384] The buggy address belongs to the object at fff00000c6500e00
[   30.997384]  which belongs to the cache kmalloc-32 of size 32
[   30.997605] The buggy address is located 0 bytes inside of
[   30.997605]  freed 32-byte region [fff00000c6500e00, fff00000c6500e20)
[   30.997723] 
[   30.997743] The buggy address belongs to the physical page:
[   30.997778] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106500
[   30.997874] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.998073] page_type: f5(slab)
[   30.998287] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   30.998384] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   30.998425] page dumped because: kasan: bad access detected
[   30.998468] 
[   30.998507] Memory state around the buggy address:
[   30.998542]  fff00000c6500d00: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   30.998584]  fff00000c6500d80: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc
[   30.998627] >fff00000c6500e00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   30.998665]                    ^
[   30.998693]  fff00000c6500e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.998736]  fff00000c6500f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.998773] ==================================================================

[   24.635207] ==================================================================
[   24.635692] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560
[   24.635975] Read of size 8 at addr ffff8881055e0c80 by task kunit_try_catch/248
[   24.636381] 
[   24.636489] CPU: 1 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250715 #1 PREEMPT(voluntary) 
[   24.636549] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.636562] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.636581] Call Trace:
[   24.636594]  <TASK>
[   24.636610]  dump_stack_lvl+0x73/0xb0
[   24.636641]  print_report+0xd1/0x610
[   24.636664]  ? __virt_addr_valid+0x1db/0x2d0
[   24.636688]  ? workqueue_uaf+0x4d6/0x560
[   24.636708]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.636733]  ? workqueue_uaf+0x4d6/0x560
[   24.636754]  kasan_report+0x141/0x180
[   24.636776]  ? workqueue_uaf+0x4d6/0x560
[   24.636801]  __asan_report_load8_noabort+0x18/0x20
[   24.636825]  workqueue_uaf+0x4d6/0x560
[   24.636847]  ? __pfx_workqueue_uaf+0x10/0x10
[   24.636890]  ? __schedule+0x10cc/0x2b60
[   24.636911]  ? __pfx_read_tsc+0x10/0x10
[   24.636933]  ? ktime_get_ts64+0x86/0x230
[   24.636958]  kunit_try_run_case+0x1a5/0x480
[   24.636982]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.637003]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.637025]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.637047]  ? __kthread_parkme+0x82/0x180
[   24.637067]  ? preempt_count_sub+0x50/0x80
[   24.637091]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.637113]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.637138]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.637163]  kthread+0x337/0x6f0
[   24.637183]  ? trace_preempt_on+0x20/0xc0
[   24.637206]  ? __pfx_kthread+0x10/0x10
[   24.637226]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.637250]  ? calculate_sigpending+0x7b/0xa0
[   24.637274]  ? __pfx_kthread+0x10/0x10
[   24.637295]  ret_from_fork+0x116/0x1d0
[   24.637314]  ? __pfx_kthread+0x10/0x10
[   24.637334]  ret_from_fork_asm+0x1a/0x30
[   24.637366]  </TASK>
[   24.637376] 
[   24.647010] Allocated by task 248:
[   24.647175]  kasan_save_stack+0x45/0x70
[   24.647357]  kasan_save_track+0x18/0x40
[   24.647536]  kasan_save_alloc_info+0x3b/0x50
[   24.648120]  __kasan_kmalloc+0xb7/0xc0
[   24.648318]  __kmalloc_cache_noprof+0x189/0x420
[   24.648529]  workqueue_uaf+0x152/0x560
[   24.648659]  kunit_try_run_case+0x1a5/0x480
[   24.648856]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.649142]  kthread+0x337/0x6f0
[   24.649292]  ret_from_fork+0x116/0x1d0
[   24.649474]  ret_from_fork_asm+0x1a/0x30
[   24.649719] 
[   24.649818] Freed by task 41:
[   24.649933]  kasan_save_stack+0x45/0x70
[   24.650109]  kasan_save_track+0x18/0x40
[   24.650285]  kasan_save_free_info+0x3f/0x60
[   24.650435]  __kasan_slab_free+0x56/0x70
[   24.650585]  kfree+0x222/0x3f0
[   24.650736]  workqueue_uaf_work+0x12/0x20
[   24.650941]  process_one_work+0x5ee/0xf60
[   24.651135]  worker_thread+0x758/0x1220
[   24.651319]  kthread+0x337/0x6f0
[   24.651458]  ret_from_fork+0x116/0x1d0
[   24.651595]  ret_from_fork_asm+0x1a/0x30
[   24.651915] 
[   24.652007] Last potentially related work creation:
[   24.652197]  kasan_save_stack+0x45/0x70
[   24.652363]  kasan_record_aux_stack+0xb2/0xc0
[   24.652744]  __queue_work+0x61a/0xe70
[   24.652924]  queue_work_on+0xb6/0xc0
[   24.653097]  workqueue_uaf+0x26d/0x560
[   24.653247]  kunit_try_run_case+0x1a5/0x480
[   24.653410]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.653613]  kthread+0x337/0x6f0
[   24.653775]  ret_from_fork+0x116/0x1d0
[   24.654006]  ret_from_fork_asm+0x1a/0x30
[   24.654213] 
[   24.654281] The buggy address belongs to the object at ffff8881055e0c80
[   24.654281]  which belongs to the cache kmalloc-32 of size 32
[   24.654866] The buggy address is located 0 bytes inside of
[   24.654866]  freed 32-byte region [ffff8881055e0c80, ffff8881055e0ca0)
[   24.655374] 
[   24.655487] The buggy address belongs to the physical page:
[   24.655765] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1055e0
[   24.656006] flags: 0x200000000000000(node=0|zone=2)
[   24.656164] page_type: f5(slab)
[   24.656353] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   24.656693] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   24.656978] page dumped because: kasan: bad access detected
[   24.657141] 
[   24.657203] Memory state around the buggy address:
[   24.657393]  ffff8881055e0b80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.657789]  ffff8881055e0c00: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   24.658062] >ffff8881055e0c80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   24.658343]                    ^
[   24.658496]  ffff8881055e0d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.659447]  ffff8881055e0d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.660032] ==================================================================