Date
July 17, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.848637] ================================================================== [ 17.848697] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 17.848747] Read of size 1 at addr fff00000c7940d90 by task kunit_try_catch/260 [ 17.848884] [ 17.848941] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.849055] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.849085] Hardware name: linux,dummy-virt (DT) [ 17.849117] Call trace: [ 17.849141] show_stack+0x20/0x38 (C) [ 17.849385] dump_stack_lvl+0x8c/0xd0 [ 17.849552] print_report+0x118/0x5d0 [ 17.849649] kasan_report+0xdc/0x128 [ 17.849748] __asan_report_load1_noabort+0x20/0x30 [ 17.849911] strlen+0xa8/0xb0 [ 17.849996] kasan_strings+0x418/0xb00 [ 17.850069] kunit_try_run_case+0x170/0x3f0 [ 17.850128] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.850194] kthread+0x328/0x630 [ 17.850238] ret_from_fork+0x10/0x20 [ 17.850513] [ 17.850558] Allocated by task 260: [ 17.850641] kasan_save_stack+0x3c/0x68 [ 17.850729] kasan_save_track+0x20/0x40 [ 17.850776] kasan_save_alloc_info+0x40/0x58 [ 17.850817] __kasan_kmalloc+0xd4/0xd8 [ 17.852784] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.852839] kasan_strings+0xc8/0xb00 [ 17.852877] kunit_try_run_case+0x170/0x3f0 [ 17.852915] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.852960] kthread+0x328/0x630 [ 17.853003] ret_from_fork+0x10/0x20 [ 17.853055] [ 17.853076] Freed by task 260: [ 17.853104] kasan_save_stack+0x3c/0x68 [ 17.853144] kasan_save_track+0x20/0x40 [ 17.853181] kasan_save_free_info+0x4c/0x78 [ 17.853222] __kasan_slab_free+0x6c/0x98 [ 17.853260] kfree+0x214/0x3c8 [ 17.853296] kasan_strings+0x24c/0xb00 [ 17.853331] kunit_try_run_case+0x170/0x3f0 [ 17.853370] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.853415] kthread+0x328/0x630 [ 17.853448] ret_from_fork+0x10/0x20 [ 17.853485] [ 17.853504] The buggy address belongs to the object at fff00000c7940d80 [ 17.853504] which belongs to the cache kmalloc-32 of size 32 [ 17.853563] The buggy address is located 16 bytes inside of [ 17.853563] freed 32-byte region [fff00000c7940d80, fff00000c7940da0) [ 17.853627] [ 17.853647] The buggy address belongs to the physical page: [ 17.853680] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107940 [ 17.853736] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.853785] page_type: f5(slab) [ 17.853826] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.853878] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 17.853922] page dumped because: kasan: bad access detected [ 17.853953] [ 17.853972] Memory state around the buggy address: [ 17.854016] fff00000c7940c80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.854063] fff00000c7940d00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 17.854109] >fff00000c7940d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.854149] ^ [ 17.854178] fff00000c7940e00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.854223] fff00000c7940e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.854264] ==================================================================
[ 15.036992] ================================================================== [ 15.037528] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 15.037745] Read of size 1 at addr ffff888102a5ed10 by task kunit_try_catch/276 [ 15.038055] [ 15.038164] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 15.038208] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.038232] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.038312] Call Trace: [ 15.038331] <TASK> [ 15.038348] dump_stack_lvl+0x73/0xb0 [ 15.038375] print_report+0xd1/0x610 [ 15.038397] ? __virt_addr_valid+0x1db/0x2d0 [ 15.038429] ? strlen+0x8f/0xb0 [ 15.038446] ? kasan_complete_mode_report_info+0x64/0x200 [ 15.038470] ? strlen+0x8f/0xb0 [ 15.038487] kasan_report+0x141/0x180 [ 15.038509] ? strlen+0x8f/0xb0 [ 15.038531] __asan_report_load1_noabort+0x18/0x20 [ 15.038567] strlen+0x8f/0xb0 [ 15.038585] kasan_strings+0x57b/0xe80 [ 15.038605] ? trace_hardirqs_on+0x37/0xe0 [ 15.038628] ? __pfx_kasan_strings+0x10/0x10 [ 15.038649] ? finish_task_switch.isra.0+0x153/0x700 [ 15.038672] ? __switch_to+0x47/0xf50 [ 15.038697] ? __schedule+0x10cc/0x2b60 [ 15.038720] ? __pfx_read_tsc+0x10/0x10 [ 15.038751] ? ktime_get_ts64+0x86/0x230 [ 15.038776] kunit_try_run_case+0x1a5/0x480 [ 15.038801] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.038836] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.038861] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.038885] ? __kthread_parkme+0x82/0x180 [ 15.038905] ? preempt_count_sub+0x50/0x80 [ 15.038929] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.038954] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.038979] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.039005] kthread+0x337/0x6f0 [ 15.039024] ? trace_preempt_on+0x20/0xc0 [ 15.039046] ? __pfx_kthread+0x10/0x10 [ 15.039067] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.039089] ? calculate_sigpending+0x7b/0xa0 [ 15.039114] ? __pfx_kthread+0x10/0x10 [ 15.039136] ret_from_fork+0x116/0x1d0 [ 15.039155] ? __pfx_kthread+0x10/0x10 [ 15.039176] ret_from_fork_asm+0x1a/0x30 [ 15.039217] </TASK> [ 15.039226] [ 15.051049] Allocated by task 276: [ 15.051220] kasan_save_stack+0x45/0x70 [ 15.051620] kasan_save_track+0x18/0x40 [ 15.051795] kasan_save_alloc_info+0x3b/0x50 [ 15.051995] __kasan_kmalloc+0xb7/0xc0 [ 15.052178] __kmalloc_cache_noprof+0x189/0x420 [ 15.052962] kasan_strings+0xc0/0xe80 [ 15.053139] kunit_try_run_case+0x1a5/0x480 [ 15.053522] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.053778] kthread+0x337/0x6f0 [ 15.053938] ret_from_fork+0x116/0x1d0 [ 15.054115] ret_from_fork_asm+0x1a/0x30 [ 15.054726] [ 15.054831] Freed by task 276: [ 15.055167] kasan_save_stack+0x45/0x70 [ 15.055649] kasan_save_track+0x18/0x40 [ 15.055842] kasan_save_free_info+0x3f/0x60 [ 15.056035] __kasan_slab_free+0x56/0x70 [ 15.056213] kfree+0x222/0x3f0 [ 15.056435] kasan_strings+0x2aa/0xe80 [ 15.056625] kunit_try_run_case+0x1a5/0x480 [ 15.056820] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.057049] kthread+0x337/0x6f0 [ 15.057190] ret_from_fork+0x116/0x1d0 [ 15.057901] ret_from_fork_asm+0x1a/0x30 [ 15.058231] [ 15.058695] The buggy address belongs to the object at ffff888102a5ed00 [ 15.058695] which belongs to the cache kmalloc-32 of size 32 [ 15.059735] The buggy address is located 16 bytes inside of [ 15.059735] freed 32-byte region [ffff888102a5ed00, ffff888102a5ed20) [ 15.060230] [ 15.060375] The buggy address belongs to the physical page: [ 15.061012] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a5e [ 15.061421] flags: 0x200000000000000(node=0|zone=2) [ 15.061654] page_type: f5(slab) [ 15.061803] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 15.062123] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 15.062713] page dumped because: kasan: bad access detected [ 15.062950] [ 15.063037] Memory state around the buggy address: [ 15.063404] ffff888102a5ec00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.063718] ffff888102a5ec80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.063999] >ffff888102a5ed00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.064391] ^ [ 15.064589] ffff888102a5ed80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.064879] ffff888102a5ee00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.065152] ==================================================================