Date
July 18, 2025, 1:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.946579] ================================================================== [ 31.946649] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 31.946727] Read of size 8 at addr fff00000c401e280 by task kunit_try_catch/231 [ 31.946784] [ 31.946824] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT [ 31.946911] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.946938] Hardware name: linux,dummy-virt (DT) [ 31.946975] Call trace: [ 31.946998] show_stack+0x20/0x38 (C) [ 31.947046] dump_stack_lvl+0x8c/0xd0 [ 31.947107] print_report+0x118/0x5e8 [ 31.947148] kasan_report+0xdc/0x128 [ 31.947191] __asan_report_load8_noabort+0x20/0x30 [ 31.947239] workqueue_uaf+0x480/0x4a8 [ 31.947284] kunit_try_run_case+0x170/0x3f0 [ 31.947340] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.947392] kthread+0x328/0x630 [ 31.947444] ret_from_fork+0x10/0x20 [ 31.947489] [ 31.947507] Allocated by task 231: [ 31.947542] kasan_save_stack+0x3c/0x68 [ 31.947581] kasan_save_track+0x20/0x40 [ 31.947618] kasan_save_alloc_info+0x40/0x58 [ 31.947655] __kasan_kmalloc+0xd4/0xd8 [ 31.947688] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.948096] workqueue_uaf+0x13c/0x4a8 [ 31.948432] kunit_try_run_case+0x170/0x3f0 [ 31.948904] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.949259] kthread+0x328/0x630 [ 31.949444] ret_from_fork+0x10/0x20 [ 31.949505] [ 31.949590] Freed by task 75: [ 31.949669] kasan_save_stack+0x3c/0x68 [ 31.949744] kasan_save_track+0x20/0x40 [ 31.949857] kasan_save_free_info+0x4c/0x78 [ 31.949926] __kasan_slab_free+0x6c/0x98 [ 31.950149] kfree+0x214/0x3c8 [ 31.950389] workqueue_uaf_work+0x18/0x30 [ 31.950459] process_one_work+0x530/0xf88 [ 31.950525] worker_thread+0x618/0xf38 [ 31.950644] kthread+0x328/0x630 [ 31.950722] ret_from_fork+0x10/0x20 [ 31.950800] [ 31.950830] Last potentially related work creation: [ 31.950858] kasan_save_stack+0x3c/0x68 [ 31.950895] kasan_record_aux_stack+0xb4/0xc8 [ 31.950933] __queue_work+0x65c/0xfe0 [ 31.950978] queue_work_on+0xbc/0xf8 [ 31.951023] workqueue_uaf+0x210/0x4a8 [ 31.951060] kunit_try_run_case+0x170/0x3f0 [ 31.951117] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.951160] kthread+0x328/0x630 [ 31.951206] ret_from_fork+0x10/0x20 [ 31.951245] [ 31.951271] The buggy address belongs to the object at fff00000c401e280 [ 31.951271] which belongs to the cache kmalloc-32 of size 32 [ 31.951343] The buggy address is located 0 bytes inside of [ 31.951343] freed 32-byte region [fff00000c401e280, fff00000c401e2a0) [ 31.951411] [ 31.951446] The buggy address belongs to the physical page: [ 31.951502] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10401e [ 31.951556] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.951638] page_type: f5(slab) [ 31.951677] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.951973] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.952197] page dumped because: kasan: bad access detected [ 31.952422] [ 31.952694] Memory state around the buggy address: [ 31.952768] fff00000c401e180: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.952990] fff00000c401e200: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 31.953278] >fff00000c401e280: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.953405] ^ [ 31.953501] fff00000c401e300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.953548] fff00000c401e380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.953766] ==================================================================
[ 25.437796] ================================================================== [ 25.438429] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 25.438730] Read of size 8 at addr ffff8881053b2fc0 by task kunit_try_catch/248 [ 25.439045] [ 25.439342] CPU: 0 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) [ 25.439397] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.439567] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.439594] Call Trace: [ 25.439608] <TASK> [ 25.439626] dump_stack_lvl+0x73/0xb0 [ 25.439662] print_report+0xd1/0x640 [ 25.439686] ? __virt_addr_valid+0x1db/0x2d0 [ 25.439711] ? workqueue_uaf+0x4d6/0x560 [ 25.439732] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.439758] ? workqueue_uaf+0x4d6/0x560 [ 25.439779] kasan_report+0x141/0x180 [ 25.439947] ? workqueue_uaf+0x4d6/0x560 [ 25.439974] __asan_report_load8_noabort+0x18/0x20 [ 25.440000] workqueue_uaf+0x4d6/0x560 [ 25.440022] ? __pfx_workqueue_uaf+0x10/0x10 [ 25.440044] ? __schedule+0x10da/0x2b60 [ 25.440067] ? __pfx_read_tsc+0x10/0x10 [ 25.440089] ? ktime_get_ts64+0x86/0x230 [ 25.440114] kunit_try_run_case+0x1a5/0x480 [ 25.440139] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.440161] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.440194] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.440240] ? __kthread_parkme+0x82/0x180 [ 25.440260] ? preempt_count_sub+0x50/0x80 [ 25.440283] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.440306] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.440328] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.440350] kthread+0x337/0x6f0 [ 25.440369] ? trace_preempt_on+0x20/0xc0 [ 25.440393] ? __pfx_kthread+0x10/0x10 [ 25.440412] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.440442] ? calculate_sigpending+0x7b/0xa0 [ 25.440465] ? __pfx_kthread+0x10/0x10 [ 25.440486] ret_from_fork+0x116/0x1d0 [ 25.440504] ? __pfx_kthread+0x10/0x10 [ 25.440523] ret_from_fork_asm+0x1a/0x30 [ 25.440554] </TASK> [ 25.440565] [ 25.452270] Allocated by task 248: [ 25.452642] kasan_save_stack+0x45/0x70 [ 25.453055] kasan_save_track+0x18/0x40 [ 25.453700] kasan_save_alloc_info+0x3b/0x50 [ 25.454130] __kasan_kmalloc+0xb7/0xc0 [ 25.454497] __kmalloc_cache_noprof+0x189/0x420 [ 25.454957] workqueue_uaf+0x152/0x560 [ 25.455409] kunit_try_run_case+0x1a5/0x480 [ 25.455559] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.455727] kthread+0x337/0x6f0 [ 25.455981] ret_from_fork+0x116/0x1d0 [ 25.456319] ret_from_fork_asm+0x1a/0x30 [ 25.456664] [ 25.456825] Freed by task 9: [ 25.457175] kasan_save_stack+0x45/0x70 [ 25.457528] kasan_save_track+0x18/0x40 [ 25.458008] kasan_save_free_info+0x3f/0x60 [ 25.458264] __kasan_slab_free+0x56/0x70 [ 25.458399] kfree+0x222/0x3f0 [ 25.458509] workqueue_uaf_work+0x12/0x20 [ 25.458650] process_one_work+0x5ee/0xf60 [ 25.458784] worker_thread+0x758/0x1220 [ 25.459175] kthread+0x337/0x6f0 [ 25.459465] ret_from_fork+0x116/0x1d0 [ 25.459797] ret_from_fork_asm+0x1a/0x30 [ 25.460174] [ 25.460353] Last potentially related work creation: [ 25.460848] kasan_save_stack+0x45/0x70 [ 25.461238] kasan_record_aux_stack+0xb2/0xc0 [ 25.461615] __queue_work+0x61a/0xe70 [ 25.462000] queue_work_on+0xb6/0xc0 [ 25.462352] workqueue_uaf+0x26d/0x560 [ 25.462697] kunit_try_run_case+0x1a5/0x480 [ 25.463283] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.463480] kthread+0x337/0x6f0 [ 25.463595] ret_from_fork+0x116/0x1d0 [ 25.463720] ret_from_fork_asm+0x1a/0x30 [ 25.464028] [ 25.464185] The buggy address belongs to the object at ffff8881053b2fc0 [ 25.464185] which belongs to the cache kmalloc-32 of size 32 [ 25.465363] The buggy address is located 0 bytes inside of [ 25.465363] freed 32-byte region [ffff8881053b2fc0, ffff8881053b2fe0) [ 25.466496] [ 25.466672] The buggy address belongs to the physical page: [ 25.466981] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053b2 [ 25.467307] flags: 0x200000000000000(node=0|zone=2) [ 25.467739] page_type: f5(slab) [ 25.468212] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 25.468884] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 25.469518] page dumped because: kasan: bad access detected [ 25.469687] [ 25.469749] Memory state around the buggy address: [ 25.470022] ffff8881053b2e80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 25.470763] ffff8881053b2f00: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 25.471490] >ffff8881053b2f80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 25.472264] ^ [ 25.472734] ffff8881053b3000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.473446] ffff8881053b3080: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc [ 25.473669] ==================================================================