Date
July 3, 2025, 10:10 a.m.
Environment | |
---|---|
dragonboard-845c | |
qemu-arm64 | |
qemu-x86_64 |
[ 45.203416] ================================================================== [ 45.213757] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 45.220557] Read of size 8 at addr ffff0000810baf00 by task kunit_try_catch/309 [ 45.227962] [ 45.229492] CPU: 6 UID: 0 PID: 309 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250703 #1 PREEMPT [ 45.229523] Tainted: [B]=BAD_PAGE, [N]=TEST [ 45.229530] Hardware name: Thundercomm Dragonboard 845c (DT) [ 45.229541] Call trace: [ 45.229547] show_stack+0x20/0x38 (C) [ 45.229565] dump_stack_lvl+0x8c/0xd0 [ 45.229584] print_report+0x118/0x608 [ 45.229605] kasan_report+0xdc/0x128 [ 45.229622] __asan_report_load8_noabort+0x20/0x30 [ 45.229641] workqueue_uaf+0x480/0x4a8 [ 45.229657] kunit_try_run_case+0x170/0x3f0 [ 45.229675] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 45.229696] kthread+0x328/0x630 [ 45.229710] ret_from_fork+0x10/0x20 [ 45.229726] [ 45.294953] Allocated by task 309: [ 45.298409] kasan_save_stack+0x3c/0x68 [ 45.302316] kasan_save_track+0x20/0x40 [ 45.306218] kasan_save_alloc_info+0x40/0x58 [ 45.310552] __kasan_kmalloc+0xd4/0xd8 [ 45.314367] __kmalloc_cache_noprof+0x16c/0x3c0 [ 45.318967] workqueue_uaf+0x13c/0x4a8 [ 45.322780] kunit_try_run_case+0x170/0x3f0 [ 45.327030] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 45.332589] kthread+0x328/0x630 [ 45.335871] ret_from_fork+0x10/0x20 [ 45.339503] [ 45.341026] Freed by task 136: [ 45.344130] kasan_save_stack+0x3c/0x68 [ 45.348035] kasan_save_track+0x20/0x40 [ 45.351938] kasan_save_free_info+0x4c/0x78 [ 45.356186] __kasan_slab_free+0x6c/0x98 [ 45.360177] kfree+0x214/0x3c8 [ 45.363290] workqueue_uaf_work+0x18/0x30 [ 45.367363] process_one_work+0x530/0xf98 [ 45.371442] worker_thread+0x618/0xf38 [ 45.375248] kthread+0x328/0x630 [ 45.378531] ret_from_fork+0x10/0x20 [ 45.382163] [ 45.383692] Last potentially related work creation: [ 45.388641] kasan_save_stack+0x3c/0x68 [ 45.392545] kasan_record_aux_stack+0xb4/0xc8 [ 45.396969] __queue_work+0x65c/0xfe0 [ 45.400696] queue_work_on+0xbc/0xf8 [ 45.404326] workqueue_uaf+0x210/0x4a8 [ 45.408141] kunit_try_run_case+0x170/0x3f0 [ 45.412390] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 45.417957] kthread+0x328/0x630 [ 45.421238] ret_from_fork+0x10/0x20 [ 45.424879] [ 45.426402] The buggy address belongs to the object at ffff0000810baf00 [ 45.426402] which belongs to the cache kmalloc-32 of size 32 [ 45.438884] The buggy address is located 0 bytes inside of [ 45.438884] freed 32-byte region [ffff0000810baf00, ffff0000810baf20) [ 45.451016] [ 45.452547] The buggy address belongs to the physical page: [ 45.458190] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1010ba [ 45.466291] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 45.472902] page_type: f5(slab) [ 45.476099] raw: 0bfffe0000000000 ffff000080002780 dead000000000100 dead000000000122 [ 45.483940] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 45.491775] page dumped because: kasan: bad access detected [ 45.497419] [ 45.498943] Memory state around the buggy address: [ 45.503800] ffff0000810bae00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 45.511110] ffff0000810bae80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 45.518427] >ffff0000810baf00: fa fb fb fb fc fc fc fc 00 00 00 07 fc fc fc fc [ 45.525739] ^ [ 45.529019] ffff0000810baf80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 45.536336] ffff0000810bb000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 45.543649] ==================================================================
[ 31.606570] ================================================================== [ 31.607320] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 31.607397] Read of size 8 at addr fff00000c9b4b600 by task kunit_try_catch/232 [ 31.607451] [ 31.607490] CPU: 0 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250703 #1 PREEMPT [ 31.607582] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.607609] Hardware name: linux,dummy-virt (DT) [ 31.608090] Call trace: [ 31.608717] show_stack+0x20/0x38 (C) [ 31.608782] dump_stack_lvl+0x8c/0xd0 [ 31.609043] print_report+0x118/0x608 [ 31.609096] kasan_report+0xdc/0x128 [ 31.609150] __asan_report_load8_noabort+0x20/0x30 [ 31.609503] workqueue_uaf+0x480/0x4a8 [ 31.609827] kunit_try_run_case+0x170/0x3f0 [ 31.610039] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.610365] kthread+0x328/0x630 [ 31.610415] ret_from_fork+0x10/0x20 [ 31.610674] [ 31.610693] Allocated by task 232: [ 31.611013] kasan_save_stack+0x3c/0x68 [ 31.611072] kasan_save_track+0x20/0x40 [ 31.611334] kasan_save_alloc_info+0x40/0x58 [ 31.611394] __kasan_kmalloc+0xd4/0xd8 [ 31.611762] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.611818] workqueue_uaf+0x13c/0x4a8 [ 31.611865] kunit_try_run_case+0x170/0x3f0 [ 31.612156] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.612213] kthread+0x328/0x630 [ 31.612457] ret_from_fork+0x10/0x20 [ 31.612556] [ 31.612755] Freed by task 9: [ 31.612786] kasan_save_stack+0x3c/0x68 [ 31.612827] kasan_save_track+0x20/0x40 [ 31.613079] kasan_save_free_info+0x4c/0x78 [ 31.613126] __kasan_slab_free+0x6c/0x98 [ 31.613403] kfree+0x214/0x3c8 [ 31.613440] workqueue_uaf_work+0x18/0x30 [ 31.613778] process_one_work+0x530/0xf98 [ 31.614247] worker_thread+0x618/0xf38 [ 31.614560] kthread+0x328/0x630 [ 31.614819] ret_from_fork+0x10/0x20 [ 31.614968] [ 31.614989] Last potentially related work creation: [ 31.615017] kasan_save_stack+0x3c/0x68 [ 31.615057] kasan_record_aux_stack+0xb4/0xc8 [ 31.615237] __queue_work+0x65c/0xfe0 [ 31.615788] queue_work_on+0xbc/0xf8 [ 31.615917] workqueue_uaf+0x210/0x4a8 [ 31.615958] kunit_try_run_case+0x170/0x3f0 [ 31.616132] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.616219] kthread+0x328/0x630 [ 31.616428] ret_from_fork+0x10/0x20 [ 31.616588] [ 31.616611] The buggy address belongs to the object at fff00000c9b4b600 [ 31.616611] which belongs to the cache kmalloc-32 of size 32 [ 31.616750] The buggy address is located 0 bytes inside of [ 31.616750] freed 32-byte region [fff00000c9b4b600, fff00000c9b4b620) [ 31.617269] [ 31.617508] The buggy address belongs to the physical page: [ 31.617979] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b4b [ 31.618049] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.618103] page_type: f5(slab) [ 31.618287] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.618557] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.618749] page dumped because: kasan: bad access detected [ 31.619030] [ 31.619059] Memory state around the buggy address: [ 31.619322] fff00000c9b4b500: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.619555] fff00000c9b4b580: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 31.619689] >fff00000c9b4b600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.619780] ^ [ 31.620070] fff00000c9b4b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.620239] fff00000c9b4b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.620359] ==================================================================
[ 23.756855] ================================================================== [ 23.757706] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 23.758421] Read of size 8 at addr ffff888104bbbc00 by task kunit_try_catch/249 [ 23.759026] [ 23.759118] CPU: 1 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250703 #1 PREEMPT(voluntary) [ 23.759166] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.759233] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.759256] Call Trace: [ 23.759269] <TASK> [ 23.759298] dump_stack_lvl+0x73/0xb0 [ 23.759329] print_report+0xd1/0x650 [ 23.759350] ? __virt_addr_valid+0x1db/0x2d0 [ 23.759374] ? workqueue_uaf+0x4d6/0x560 [ 23.759440] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.759482] ? workqueue_uaf+0x4d6/0x560 [ 23.759503] kasan_report+0x141/0x180 [ 23.759525] ? workqueue_uaf+0x4d6/0x560 [ 23.759550] __asan_report_load8_noabort+0x18/0x20 [ 23.759573] workqueue_uaf+0x4d6/0x560 [ 23.759594] ? __pfx_workqueue_uaf+0x10/0x10 [ 23.759615] ? __schedule+0x10cc/0x2b60 [ 23.759640] ? __pfx_read_tsc+0x10/0x10 [ 23.759663] ? ktime_get_ts64+0x86/0x230 [ 23.759688] kunit_try_run_case+0x1a5/0x480 [ 23.759714] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.759753] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 23.759774] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.759799] ? __kthread_parkme+0x82/0x180 [ 23.759819] ? preempt_count_sub+0x50/0x80 [ 23.759843] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.759866] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.759889] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.759912] kthread+0x337/0x6f0 [ 23.759931] ? trace_preempt_on+0x20/0xc0 [ 23.759954] ? __pfx_kthread+0x10/0x10 [ 23.759974] ? _raw_spin_unlock_irq+0x47/0x80 [ 23.759997] ? calculate_sigpending+0x7b/0xa0 [ 23.760021] ? __pfx_kthread+0x10/0x10 [ 23.760042] ret_from_fork+0x116/0x1d0 [ 23.760060] ? __pfx_kthread+0x10/0x10 [ 23.760080] ret_from_fork_asm+0x1a/0x30 [ 23.760110] </TASK> [ 23.760121] [ 23.770861] Allocated by task 249: [ 23.771039] kasan_save_stack+0x45/0x70 [ 23.771426] kasan_save_track+0x18/0x40 [ 23.771630] kasan_save_alloc_info+0x3b/0x50 [ 23.771776] __kasan_kmalloc+0xb7/0xc0 [ 23.771950] __kmalloc_cache_noprof+0x189/0x420 [ 23.772210] workqueue_uaf+0x152/0x560 [ 23.772399] kunit_try_run_case+0x1a5/0x480 [ 23.772860] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.773886] kthread+0x337/0x6f0 [ 23.774022] ret_from_fork+0x116/0x1d0 [ 23.774376] ret_from_fork_asm+0x1a/0x30 [ 23.774868] [ 23.774967] Freed by task 44: [ 23.775409] kasan_save_stack+0x45/0x70 [ 23.775574] kasan_save_track+0x18/0x40 [ 23.775969] kasan_save_free_info+0x3f/0x60 [ 23.776163] __kasan_slab_free+0x56/0x70 [ 23.776650] kfree+0x222/0x3f0 [ 23.776779] workqueue_uaf_work+0x12/0x20 [ 23.777120] process_one_work+0x5ee/0xf60 [ 23.777435] worker_thread+0x758/0x1220 [ 23.777909] kthread+0x337/0x6f0 [ 23.778031] ret_from_fork+0x116/0x1d0 [ 23.778512] ret_from_fork_asm+0x1a/0x30 [ 23.778869] [ 23.778948] Last potentially related work creation: [ 23.779376] kasan_save_stack+0x45/0x70 [ 23.779599] kasan_record_aux_stack+0xb2/0xc0 [ 23.780014] __queue_work+0x61a/0xe70 [ 23.780223] queue_work_on+0xb6/0xc0 [ 23.780361] workqueue_uaf+0x26d/0x560 [ 23.780562] kunit_try_run_case+0x1a5/0x480 [ 23.780767] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.780987] kthread+0x337/0x6f0 [ 23.781151] ret_from_fork+0x116/0x1d0 [ 23.781735] ret_from_fork_asm+0x1a/0x30 [ 23.781905] [ 23.782279] The buggy address belongs to the object at ffff888104bbbc00 [ 23.782279] which belongs to the cache kmalloc-32 of size 32 [ 23.782915] The buggy address is located 0 bytes inside of [ 23.782915] freed 32-byte region [ffff888104bbbc00, ffff888104bbbc20) [ 23.783706] [ 23.783811] The buggy address belongs to the physical page: [ 23.784045] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104bbb [ 23.784720] flags: 0x200000000000000(node=0|zone=2) [ 23.785038] page_type: f5(slab) [ 23.785166] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 23.785790] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.786204] page dumped because: kasan: bad access detected [ 23.786712] [ 23.786793] Memory state around the buggy address: [ 23.787189] ffff888104bbbb00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 23.787732] ffff888104bbbb80: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 23.788073] >ffff888104bbbc00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 23.788694] ^ [ 23.788853] ffff888104bbbc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.789357] ffff888104bbbd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.789667] ==================================================================