Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 23.668931] ================================================================== [ 23.670153] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 23.670987] Read of size 8 at addr fff00000c637b440 by task kunit_try_catch/189 [ 23.671775] [ 23.672061] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 23.672244] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.672319] Hardware name: linux,dummy-virt (DT) [ 23.672397] Call trace: [ 23.672459] show_stack+0x20/0x38 (C) [ 23.672594] dump_stack_lvl+0x8c/0xd0 [ 23.672734] print_report+0x118/0x608 [ 23.672874] kasan_report+0xdc/0x128 [ 23.673034] __asan_report_load8_noabort+0x20/0x30 [ 23.673170] workqueue_uaf+0x480/0x4a8 [ 23.673295] kunit_try_run_case+0x170/0x3f0 [ 23.673431] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.673636] kthread+0x318/0x620 [ 23.673770] ret_from_fork+0x10/0x20 [ 23.673926] [ 23.680055] Allocated by task 189: [ 23.680540] kasan_save_stack+0x3c/0x68 [ 23.681157] kasan_save_track+0x20/0x40 [ 23.681802] kasan_save_alloc_info+0x40/0x58 [ 23.682317] __kasan_kmalloc+0xd4/0xd8 [ 23.682829] __kmalloc_cache_noprof+0x16c/0x3c0 [ 23.683505] workqueue_uaf+0x13c/0x4a8 [ 23.685016] kunit_try_run_case+0x170/0x3f0 [ 23.685549] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.686210] kthread+0x318/0x620 [ 23.686693] ret_from_fork+0x10/0x20 [ 23.687318] [ 23.687592] Freed by task 46: [ 23.688946] kasan_save_stack+0x3c/0x68 [ 23.689580] kasan_save_track+0x20/0x40 [ 23.689983] kasan_save_free_info+0x4c/0x78 [ 23.690425] __kasan_slab_free+0x6c/0x98 [ 23.690958] kfree+0x214/0x3c8 [ 23.691465] workqueue_uaf_work+0x18/0x30 [ 23.691990] process_one_work+0x530/0xf98 [ 23.692604] worker_thread+0x610/0xf18 [ 23.693218] kthread+0x318/0x620 [ 23.693757] ret_from_fork+0x10/0x20 [ 23.694451] [ 23.694819] Last potentially related work creation: [ 23.695422] kasan_save_stack+0x3c/0x68 [ 23.695954] kasan_record_aux_stack+0xb4/0xc8 [ 23.696572] __queue_work+0x65c/0x1008 [ 23.697223] queue_work_on+0xbc/0xf8 [ 23.697771] workqueue_uaf+0x210/0x4a8 [ 23.698429] kunit_try_run_case+0x170/0x3f0 [ 23.699679] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.701529] kthread+0x318/0x620 [ 23.702215] ret_from_fork+0x10/0x20 [ 23.702717] [ 23.703104] The buggy address belongs to the object at fff00000c637b440 [ 23.703104] which belongs to the cache kmalloc-32 of size 32 [ 23.704289] The buggy address is located 0 bytes inside of [ 23.704289] freed 32-byte region [fff00000c637b440, fff00000c637b460) [ 23.705486] [ 23.705877] The buggy address belongs to the physical page: [ 23.706712] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10637b [ 23.707706] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 23.708707] page_type: f5(slab) [ 23.709192] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 23.710139] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.711110] page dumped because: kasan: bad access detected [ 23.711749] [ 23.712128] Memory state around the buggy address: [ 23.712746] fff00000c637b300: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 23.714002] fff00000c637b380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 23.714668] >fff00000c637b400: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 23.715739] ^ [ 23.716373] fff00000c637b480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.717076] fff00000c637b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.717977] ==================================================================
[ 18.477717] ================================================================== [ 18.478757] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d8/0x560 [ 18.479514] Read of size 8 at addr ffff888102ca8d00 by task kunit_try_catch/208 [ 18.480689] [ 18.481500] CPU: 0 UID: 0 PID: 208 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 18.481833] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.481889] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 18.481943] Call Trace: [ 18.481975] <TASK> [ 18.482015] dump_stack_lvl+0x73/0xb0 [ 18.482098] print_report+0xd1/0x650 [ 18.482147] ? __virt_addr_valid+0x1db/0x2d0 [ 18.482195] ? workqueue_uaf+0x4d8/0x560 [ 18.482234] ? kasan_complete_mode_report_info+0x64/0x200 [ 18.482283] ? workqueue_uaf+0x4d8/0x560 [ 18.482324] kasan_report+0x140/0x180 [ 18.482378] ? workqueue_uaf+0x4d8/0x560 [ 18.482428] __asan_report_load8_noabort+0x18/0x20 [ 18.482477] workqueue_uaf+0x4d8/0x560 [ 18.482520] ? __pfx_workqueue_uaf+0x10/0x10 [ 18.482564] ? __pfx_workqueue_uaf+0x10/0x10 [ 18.482614] kunit_try_run_case+0x1a6/0x480 [ 18.482675] ? __pfx_kunit_try_run_case+0x10/0x10 [ 18.483004] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 18.483124] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 18.483165] ? __kthread_parkme+0x82/0x160 [ 18.483197] ? preempt_count_sub+0x50/0x80 [ 18.483231] ? __pfx_kunit_try_run_case+0x10/0x10 [ 18.483261] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.483296] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 18.483359] kthread+0x324/0x6e0 [ 18.483386] ? trace_preempt_on+0x20/0xc0 [ 18.483419] ? __pfx_kthread+0x10/0x10 [ 18.483559] ? _raw_spin_unlock_irq+0x47/0x80 [ 18.483591] ? calculate_sigpending+0x7b/0xa0 [ 18.483622] ? __pfx_kthread+0x10/0x10 [ 18.483651] ret_from_fork+0x41/0x80 [ 18.483678] ? __pfx_kthread+0x10/0x10 [ 18.483719] ret_from_fork_asm+0x1a/0x30 [ 18.483761] </TASK> [ 18.483776] [ 18.499806] Allocated by task 208: [ 18.500138] kasan_save_stack+0x45/0x70 [ 18.500799] kasan_save_track+0x18/0x40 [ 18.501198] kasan_save_alloc_info+0x3b/0x50 [ 18.502253] __kasan_kmalloc+0xb7/0xc0 [ 18.502773] __kmalloc_cache_noprof+0x18a/0x420 [ 18.503131] workqueue_uaf+0x153/0x560 [ 18.503759] kunit_try_run_case+0x1a6/0x480 [ 18.504136] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.504817] kthread+0x324/0x6e0 [ 18.505194] ret_from_fork+0x41/0x80 [ 18.506007] ret_from_fork_asm+0x1a/0x30 [ 18.506652] [ 18.506831] Freed by task 72: [ 18.507147] kasan_save_stack+0x45/0x70 [ 18.507532] kasan_save_track+0x18/0x40 [ 18.508034] kasan_save_free_info+0x3f/0x60 [ 18.508433] __kasan_slab_free+0x56/0x70 [ 18.508940] kfree+0x224/0x3f0 [ 18.509344] workqueue_uaf_work+0x12/0x20 [ 18.510150] process_one_work+0x5ee/0xf60 [ 18.510881] worker_thread+0x753/0x1200 [ 18.511386] kthread+0x324/0x6e0 [ 18.511683] ret_from_fork+0x41/0x80 [ 18.512116] ret_from_fork_asm+0x1a/0x30 [ 18.512626] [ 18.512886] Last potentially related work creation: [ 18.513272] kasan_save_stack+0x45/0x70 [ 18.514384] kasan_record_aux_stack+0xb2/0xc0 [ 18.514630] __queue_work+0x626/0xeb0 [ 18.515260] queue_work_on+0x74/0xa0 [ 18.515831] workqueue_uaf+0x26e/0x560 [ 18.516162] kunit_try_run_case+0x1a6/0x480 [ 18.516722] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.517216] kthread+0x324/0x6e0 [ 18.518230] ret_from_fork+0x41/0x80 [ 18.518584] ret_from_fork_asm+0x1a/0x30 [ 18.519041] [ 18.519256] The buggy address belongs to the object at ffff888102ca8d00 [ 18.519256] which belongs to the cache kmalloc-32 of size 32 [ 18.520043] The buggy address is located 0 bytes inside of [ 18.520043] freed 32-byte region [ffff888102ca8d00, ffff888102ca8d20) [ 18.520938] [ 18.521166] The buggy address belongs to the physical page: [ 18.522560] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ca8 [ 18.523214] flags: 0x200000000000000(node=0|zone=2) [ 18.524033] page_type: f5(slab) [ 18.524344] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 18.524946] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.525129] page dumped because: kasan: bad access detected [ 18.525265] [ 18.525333] Memory state around the buggy address: [ 18.526036] ffff888102ca8c00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.527124] ffff888102ca8c80: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.528065] >ffff888102ca8d00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 18.528926] ^ [ 18.529253] ffff888102ca8d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.529874] ffff888102ca8e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.530377] ==================================================================