Date
May 12, 2025, 11:48 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.033952] ================================================================== [ 19.034167] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 19.034239] Read of size 1 at addr fff00000c78896d0 by task kunit_try_catch/259 [ 19.034293] [ 19.034326] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT [ 19.034522] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.034557] Hardware name: linux,dummy-virt (DT) [ 19.034603] Call trace: [ 19.034628] show_stack+0x20/0x38 (C) [ 19.034684] dump_stack_lvl+0x8c/0xd0 [ 19.034734] print_report+0x118/0x608 [ 19.034781] kasan_report+0xdc/0x128 [ 19.034894] __asan_report_load1_noabort+0x20/0x30 [ 19.034977] strlen+0xa8/0xb0 [ 19.035034] kasan_strings+0x418/0xb00 [ 19.035096] kunit_try_run_case+0x170/0x3f0 [ 19.035151] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.035226] kthread+0x328/0x630 [ 19.035499] ret_from_fork+0x10/0x20 [ 19.035568] [ 19.035605] Allocated by task 259: [ 19.035640] kasan_save_stack+0x3c/0x68 [ 19.035853] kasan_save_track+0x20/0x40 [ 19.036087] kasan_save_alloc_info+0x40/0x58 [ 19.036290] __kasan_kmalloc+0xd4/0xd8 [ 19.036719] __kmalloc_cache_noprof+0x15c/0x3c0 [ 19.036787] kasan_strings+0xc8/0xb00 [ 19.036825] kunit_try_run_case+0x170/0x3f0 [ 19.036987] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.037254] kthread+0x328/0x630 [ 19.037471] ret_from_fork+0x10/0x20 [ 19.037689] [ 19.037750] Freed by task 259: [ 19.037788] kasan_save_stack+0x3c/0x68 [ 19.037938] kasan_save_track+0x20/0x40 [ 19.037985] kasan_save_free_info+0x4c/0x78 [ 19.038102] __kasan_slab_free+0x6c/0x98 [ 19.038146] kfree+0x214/0x3c8 [ 19.038182] kasan_strings+0x24c/0xb00 [ 19.038216] kunit_try_run_case+0x170/0x3f0 [ 19.038254] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.038297] kthread+0x328/0x630 [ 19.038335] ret_from_fork+0x10/0x20 [ 19.038370] [ 19.038393] The buggy address belongs to the object at fff00000c78896c0 [ 19.038393] which belongs to the cache kmalloc-32 of size 32 [ 19.038450] The buggy address is located 16 bytes inside of [ 19.038450] freed 32-byte region [fff00000c78896c0, fff00000c78896e0) [ 19.038710] [ 19.038847] The buggy address belongs to the physical page: [ 19.038926] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107889 [ 19.039036] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.039102] page_type: f5(slab) [ 19.039569] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.039750] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.039846] page dumped because: kasan: bad access detected [ 19.039888] [ 19.039951] Memory state around the buggy address: [ 19.040009] fff00000c7889580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.040224] fff00000c7889600: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 19.040498] >fff00000c7889680: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.040641] ^ [ 19.040698] fff00000c7889700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.040751] fff00000c7889780: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.040792] ==================================================================
[ 19.023433] ================================================================== [ 19.024420] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 19.025365] Read of size 1 at addr ffff888102327750 by task kunit_try_catch/276 [ 19.025782] [ 19.026065] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) [ 19.026214] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.026244] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 19.026299] Call Trace: [ 19.026328] <TASK> [ 19.026365] dump_stack_lvl+0x73/0xb0 [ 19.026434] print_report+0xd1/0x650 [ 19.026487] ? __virt_addr_valid+0x1db/0x2d0 [ 19.026569] ? strlen+0x8f/0xb0 [ 19.026630] ? kasan_complete_mode_report_info+0x64/0x200 [ 19.026717] ? strlen+0x8f/0xb0 [ 19.026765] kasan_report+0x141/0x180 [ 19.026802] ? strlen+0x8f/0xb0 [ 19.026830] __asan_report_load1_noabort+0x18/0x20 [ 19.026854] strlen+0x8f/0xb0 [ 19.026878] kasan_strings+0x57b/0xe80 [ 19.026901] ? trace_hardirqs_on+0x37/0xe0 [ 19.026928] ? __pfx_kasan_strings+0x10/0x10 [ 19.026952] ? finish_task_switch.isra.0+0x153/0x700 [ 19.026978] ? __switch_to+0x47/0xf50 [ 19.027022] ? __schedule+0x10cc/0x2b60 [ 19.027048] ? __pfx_read_tsc+0x10/0x10 [ 19.027072] ? ktime_get_ts64+0x86/0x230 [ 19.027099] kunit_try_run_case+0x1a5/0x480 [ 19.027128] ? __pfx_kunit_try_run_case+0x10/0x10 [ 19.027153] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 19.027179] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 19.027204] ? __kthread_parkme+0x82/0x180 [ 19.027228] ? preempt_count_sub+0x50/0x80 [ 19.027252] ? __pfx_kunit_try_run_case+0x10/0x10 [ 19.027304] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.027331] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 19.027357] kthread+0x337/0x6f0 [ 19.027379] ? trace_preempt_on+0x20/0xc0 [ 19.027403] ? __pfx_kthread+0x10/0x10 [ 19.027425] ? _raw_spin_unlock_irq+0x47/0x80 [ 19.027448] ? calculate_sigpending+0x7b/0xa0 [ 19.027476] ? __pfx_kthread+0x10/0x10 [ 19.027499] ret_from_fork+0x116/0x1d0 [ 19.027519] ? __pfx_kthread+0x10/0x10 [ 19.027541] ret_from_fork_asm+0x1a/0x30 [ 19.027574] </TASK> [ 19.027589] [ 19.038788] Allocated by task 276: [ 19.039015] kasan_save_stack+0x45/0x70 [ 19.039253] kasan_save_track+0x18/0x40 [ 19.039600] kasan_save_alloc_info+0x3b/0x50 [ 19.040039] __kasan_kmalloc+0xb7/0xc0 [ 19.040465] __kmalloc_cache_noprof+0x189/0x420 [ 19.040936] kasan_strings+0xc0/0xe80 [ 19.041329] kunit_try_run_case+0x1a5/0x480 [ 19.041816] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.042331] kthread+0x337/0x6f0 [ 19.042727] ret_from_fork+0x116/0x1d0 [ 19.043037] ret_from_fork_asm+0x1a/0x30 [ 19.043413] [ 19.043641] Freed by task 276: [ 19.043893] kasan_save_stack+0x45/0x70 [ 19.044108] kasan_save_track+0x18/0x40 [ 19.044320] kasan_save_free_info+0x3f/0x60 [ 19.044704] __kasan_slab_free+0x56/0x70 [ 19.045128] kfree+0x222/0x3f0 [ 19.045480] kasan_strings+0x2aa/0xe80 [ 19.045890] kunit_try_run_case+0x1a5/0x480 [ 19.046305] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.046726] kthread+0x337/0x6f0 [ 19.047044] ret_from_fork+0x116/0x1d0 [ 19.047381] ret_from_fork_asm+0x1a/0x30 [ 19.047590] [ 19.047748] The buggy address belongs to the object at ffff888102327740 [ 19.047748] which belongs to the cache kmalloc-32 of size 32 [ 19.048449] The buggy address is located 16 bytes inside of [ 19.048449] freed 32-byte region [ffff888102327740, ffff888102327760) [ 19.049452] [ 19.049725] The buggy address belongs to the physical page: [ 19.050081] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102327 [ 19.050400] flags: 0x200000000000000(node=0|zone=2) [ 19.050630] page_type: f5(slab) [ 19.050849] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 19.051503] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.052162] page dumped because: kasan: bad access detected [ 19.052596] [ 19.052850] Memory state around the buggy address: [ 19.053329] ffff888102327600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.053936] ffff888102327680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.054292] >ffff888102327700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.054813] ^ [ 19.055066] ffff888102327780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.055352] ffff888102327800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.055711] ==================================================================