Date
July 12, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.777133] ================================================================== [ 18.777207] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 18.777257] Read of size 1 at addr fff00000c66fec50 by task kunit_try_catch/259 [ 18.777309] [ 18.777485] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 18.777587] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.777634] Hardware name: linux,dummy-virt (DT) [ 18.777668] Call trace: [ 18.777694] show_stack+0x20/0x38 (C) [ 18.777755] dump_stack_lvl+0x8c/0xd0 [ 18.777812] print_report+0x118/0x5d0 [ 18.777859] kasan_report+0xdc/0x128 [ 18.777905] __asan_report_load1_noabort+0x20/0x30 [ 18.777963] strnlen+0x80/0x88 [ 18.778004] kasan_strings+0x478/0xb00 [ 18.778055] kunit_try_run_case+0x170/0x3f0 [ 18.778105] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.778160] kthread+0x328/0x630 [ 18.778211] ret_from_fork+0x10/0x20 [ 18.778259] [ 18.778279] Allocated by task 259: [ 18.778308] kasan_save_stack+0x3c/0x68 [ 18.778352] kasan_save_track+0x20/0x40 [ 18.778393] kasan_save_alloc_info+0x40/0x58 [ 18.778434] __kasan_kmalloc+0xd4/0xd8 [ 18.778474] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.778514] kasan_strings+0xc8/0xb00 [ 18.778551] kunit_try_run_case+0x170/0x3f0 [ 18.778594] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.778640] kthread+0x328/0x630 [ 18.778674] ret_from_fork+0x10/0x20 [ 18.778711] [ 18.778742] Freed by task 259: [ 18.778770] kasan_save_stack+0x3c/0x68 [ 18.778819] kasan_save_track+0x20/0x40 [ 18.779201] kasan_save_free_info+0x4c/0x78 [ 18.781196] __kasan_slab_free+0x6c/0x98 [ 18.781271] kfree+0x214/0x3c8 [ 18.781315] kasan_strings+0x24c/0xb00 [ 18.781359] kunit_try_run_case+0x170/0x3f0 [ 18.781401] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.781446] kthread+0x328/0x630 [ 18.781481] ret_from_fork+0x10/0x20 [ 18.781519] [ 18.781541] The buggy address belongs to the object at fff00000c66fec40 [ 18.781541] which belongs to the cache kmalloc-32 of size 32 [ 18.781604] The buggy address is located 16 bytes inside of [ 18.781604] freed 32-byte region [fff00000c66fec40, fff00000c66fec60) [ 18.781669] [ 18.781691] The buggy address belongs to the physical page: [ 18.781725] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066fe [ 18.781778] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.781829] page_type: f5(slab) [ 18.781869] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.781922] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.781972] page dumped because: kasan: bad access detected [ 18.782007] [ 18.782027] Memory state around the buggy address: [ 18.782061] fff00000c66feb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.782107] fff00000c66feb80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.782154] >fff00000c66fec00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 18.782207] ^ [ 18.782247] fff00000c66fec80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.782293] fff00000c66fed00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 18.782336] ==================================================================
[ 14.995922] ================================================================== [ 14.996440] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.996730] Read of size 1 at addr ffff888103a693d0 by task kunit_try_catch/276 [ 14.997059] [ 14.997165] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.997206] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.997218] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.997239] Call Trace: [ 14.997255] <TASK> [ 14.997279] dump_stack_lvl+0x73/0xb0 [ 14.997306] print_report+0xd1/0x610 [ 14.997329] ? __virt_addr_valid+0x1db/0x2d0 [ 14.997351] ? strnlen+0x73/0x80 [ 14.997368] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.997392] ? strnlen+0x73/0x80 [ 14.997409] kasan_report+0x141/0x180 [ 14.997431] ? strnlen+0x73/0x80 [ 14.997452] __asan_report_load1_noabort+0x18/0x20 [ 14.997478] strnlen+0x73/0x80 [ 14.997496] kasan_strings+0x615/0xe80 [ 14.997516] ? trace_hardirqs_on+0x37/0xe0 [ 14.997538] ? __pfx_kasan_strings+0x10/0x10 [ 14.997559] ? finish_task_switch.isra.0+0x153/0x700 [ 14.997583] ? __switch_to+0x47/0xf50 [ 14.997609] ? __schedule+0x10cc/0x2b60 [ 14.997631] ? __pfx_read_tsc+0x10/0x10 [ 14.997652] ? ktime_get_ts64+0x86/0x230 [ 14.997675] kunit_try_run_case+0x1a5/0x480 [ 14.997699] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.997723] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.997747] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.997771] ? __kthread_parkme+0x82/0x180 [ 14.997792] ? preempt_count_sub+0x50/0x80 [ 14.997815] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.997840] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.997866] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.997891] kthread+0x337/0x6f0 [ 14.997910] ? trace_preempt_on+0x20/0xc0 [ 14.997932] ? __pfx_kthread+0x10/0x10 [ 14.997953] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.997975] ? calculate_sigpending+0x7b/0xa0 [ 14.997999] ? __pfx_kthread+0x10/0x10 [ 14.998021] ret_from_fork+0x116/0x1d0 [ 14.998039] ? __pfx_kthread+0x10/0x10 [ 14.998059] ret_from_fork_asm+0x1a/0x30 [ 14.998089] </TASK> [ 14.998099] [ 15.004893] Allocated by task 276: [ 15.005069] kasan_save_stack+0x45/0x70 [ 15.005283] kasan_save_track+0x18/0x40 [ 15.005472] kasan_save_alloc_info+0x3b/0x50 [ 15.005652] __kasan_kmalloc+0xb7/0xc0 [ 15.005821] __kmalloc_cache_noprof+0x189/0x420 [ 15.005978] kasan_strings+0xc0/0xe80 [ 15.006159] kunit_try_run_case+0x1a5/0x480 [ 15.006378] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.006592] kthread+0x337/0x6f0 [ 15.006715] ret_from_fork+0x116/0x1d0 [ 15.006846] ret_from_fork_asm+0x1a/0x30 [ 15.006986] [ 15.007054] Freed by task 276: [ 15.007163] kasan_save_stack+0x45/0x70 [ 15.007321] kasan_save_track+0x18/0x40 [ 15.007511] kasan_save_free_info+0x3f/0x60 [ 15.007712] __kasan_slab_free+0x56/0x70 [ 15.007902] kfree+0x222/0x3f0 [ 15.008058] kasan_strings+0x2aa/0xe80 [ 15.008241] kunit_try_run_case+0x1a5/0x480 [ 15.008451] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.008701] kthread+0x337/0x6f0 [ 15.008864] ret_from_fork+0x116/0x1d0 [ 15.009047] ret_from_fork_asm+0x1a/0x30 [ 15.009238] [ 15.009341] The buggy address belongs to the object at ffff888103a693c0 [ 15.009341] which belongs to the cache kmalloc-32 of size 32 [ 15.009711] The buggy address is located 16 bytes inside of [ 15.009711] freed 32-byte region [ffff888103a693c0, ffff888103a693e0) [ 15.010132] [ 15.010226] The buggy address belongs to the physical page: [ 15.010485] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a69 [ 15.010847] flags: 0x200000000000000(node=0|zone=2) [ 15.011080] page_type: f5(slab) [ 15.011223] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 15.011550] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 15.011851] page dumped because: kasan: bad access detected [ 15.012021] [ 15.012088] Memory state around the buggy address: [ 15.012243] ffff888103a69280: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.012469] ffff888103a69300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.012682] >ffff888103a69380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.012998] ^ [ 15.013257] ffff888103a69400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.013586] ffff888103a69480: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.013902] ==================================================================