Date
July 18, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.686045] ================================================================== [ 17.686313] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 17.686477] Read of size 1 at addr fff00000c7848510 by task kunit_try_catch/259 [ 17.686700] [ 17.686799] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.686916] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.687129] Hardware name: linux,dummy-virt (DT) [ 17.687172] Call trace: [ 17.687389] show_stack+0x20/0x38 (C) [ 17.687482] dump_stack_lvl+0x8c/0xd0 [ 17.687535] print_report+0x118/0x5d0 [ 17.687596] kasan_report+0xdc/0x128 [ 17.687751] __asan_report_load1_noabort+0x20/0x30 [ 17.687812] strnlen+0x80/0x88 [ 17.687872] kasan_strings+0x478/0xb00 [ 17.687923] kunit_try_run_case+0x170/0x3f0 [ 17.688144] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.688218] kthread+0x328/0x630 [ 17.688264] ret_from_fork+0x10/0x20 [ 17.688753] [ 17.688794] Allocated by task 259: [ 17.688827] kasan_save_stack+0x3c/0x68 [ 17.688874] kasan_save_track+0x20/0x40 [ 17.688913] kasan_save_alloc_info+0x40/0x58 [ 17.688962] __kasan_kmalloc+0xd4/0xd8 [ 17.689000] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.689045] kasan_strings+0xc8/0xb00 [ 17.689082] kunit_try_run_case+0x170/0x3f0 [ 17.689122] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.689198] kthread+0x328/0x630 [ 17.689238] ret_from_fork+0x10/0x20 [ 17.689276] [ 17.689298] Freed by task 259: [ 17.689343] kasan_save_stack+0x3c/0x68 [ 17.689655] kasan_save_track+0x20/0x40 [ 17.689733] kasan_save_free_info+0x4c/0x78 [ 17.689795] __kasan_slab_free+0x6c/0x98 [ 17.689873] kfree+0x214/0x3c8 [ 17.689946] kasan_strings+0x24c/0xb00 [ 17.690275] kunit_try_run_case+0x170/0x3f0 [ 17.690618] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.690704] kthread+0x328/0x630 [ 17.691074] ret_from_fork+0x10/0x20 [ 17.691311] [ 17.691526] The buggy address belongs to the object at fff00000c7848500 [ 17.691526] which belongs to the cache kmalloc-32 of size 32 [ 17.691641] The buggy address is located 16 bytes inside of [ 17.691641] freed 32-byte region [fff00000c7848500, fff00000c7848520) [ 17.691994] [ 17.692152] The buggy address belongs to the physical page: [ 17.692473] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107848 [ 17.692550] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.692753] page_type: f5(slab) [ 17.692837] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.693172] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.693234] page dumped because: kasan: bad access detected [ 17.693272] [ 17.693627] Memory state around the buggy address: [ 17.693752] fff00000c7848400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.693803] fff00000c7848480: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 17.694230] >fff00000c7848500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.694348] ^ [ 17.694424] fff00000c7848580: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.694492] fff00000c7848600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.694662] ==================================================================
[ 14.178666] ================================================================== [ 14.179276] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.179637] Read of size 1 at addr ffff888103a23e10 by task kunit_try_catch/278 [ 14.180129] [ 14.180234] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 14.180280] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.180291] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.180324] Call Trace: [ 14.180339] <TASK> [ 14.180353] dump_stack_lvl+0x73/0xb0 [ 14.180380] print_report+0xd1/0x610 [ 14.180403] ? __virt_addr_valid+0x1db/0x2d0 [ 14.180425] ? strnlen+0x73/0x80 [ 14.180442] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.180692] ? strnlen+0x73/0x80 [ 14.180712] kasan_report+0x141/0x180 [ 14.180734] ? strnlen+0x73/0x80 [ 14.180756] __asan_report_load1_noabort+0x18/0x20 [ 14.180780] strnlen+0x73/0x80 [ 14.180799] kasan_strings+0x615/0xe80 [ 14.180819] ? trace_hardirqs_on+0x37/0xe0 [ 14.180842] ? __pfx_kasan_strings+0x10/0x10 [ 14.180862] ? finish_task_switch.isra.0+0x153/0x700 [ 14.180939] ? __switch_to+0x47/0xf50 [ 14.181028] ? __schedule+0x10cc/0x2b60 [ 14.181054] ? __pfx_read_tsc+0x10/0x10 [ 14.181075] ? ktime_get_ts64+0x86/0x230 [ 14.181098] kunit_try_run_case+0x1a5/0x480 [ 14.181123] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.181145] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.181169] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.181193] ? __kthread_parkme+0x82/0x180 [ 14.181213] ? preempt_count_sub+0x50/0x80 [ 14.181236] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.181260] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.181284] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.181318] kthread+0x337/0x6f0 [ 14.181337] ? trace_preempt_on+0x20/0xc0 [ 14.181359] ? __pfx_kthread+0x10/0x10 [ 14.181379] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.181400] ? calculate_sigpending+0x7b/0xa0 [ 14.181423] ? __pfx_kthread+0x10/0x10 [ 14.181444] ret_from_fork+0x116/0x1d0 [ 14.181462] ? __pfx_kthread+0x10/0x10 [ 14.181481] ret_from_fork_asm+0x1a/0x30 [ 14.181512] </TASK> [ 14.181521] [ 14.191824] Allocated by task 278: [ 14.192238] kasan_save_stack+0x45/0x70 [ 14.192699] kasan_save_track+0x18/0x40 [ 14.192861] kasan_save_alloc_info+0x3b/0x50 [ 14.193255] __kasan_kmalloc+0xb7/0xc0 [ 14.193448] __kmalloc_cache_noprof+0x189/0x420 [ 14.193645] kasan_strings+0xc0/0xe80 [ 14.193821] kunit_try_run_case+0x1a5/0x480 [ 14.194001] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.194508] kthread+0x337/0x6f0 [ 14.194668] ret_from_fork+0x116/0x1d0 [ 14.194864] ret_from_fork_asm+0x1a/0x30 [ 14.195211] [ 14.195373] Freed by task 278: [ 14.195613] kasan_save_stack+0x45/0x70 [ 14.195856] kasan_save_track+0x18/0x40 [ 14.196175] kasan_save_free_info+0x3f/0x60 [ 14.196421] __kasan_slab_free+0x56/0x70 [ 14.196609] kfree+0x222/0x3f0 [ 14.196804] kasan_strings+0x2aa/0xe80 [ 14.197106] kunit_try_run_case+0x1a5/0x480 [ 14.197409] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.197847] kthread+0x337/0x6f0 [ 14.197984] ret_from_fork+0x116/0x1d0 [ 14.198233] ret_from_fork_asm+0x1a/0x30 [ 14.198469] [ 14.198548] The buggy address belongs to the object at ffff888103a23e00 [ 14.198548] which belongs to the cache kmalloc-32 of size 32 [ 14.199314] The buggy address is located 16 bytes inside of [ 14.199314] freed 32-byte region [ffff888103a23e00, ffff888103a23e20) [ 14.199875] [ 14.199982] The buggy address belongs to the physical page: [ 14.200204] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a23 [ 14.200822] flags: 0x200000000000000(node=0|zone=2) [ 14.201047] page_type: f5(slab) [ 14.201328] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.201687] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 14.202069] page dumped because: kasan: bad access detected [ 14.202291] [ 14.202398] Memory state around the buggy address: [ 14.202597] ffff888103a23d00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.202930] ffff888103a23d80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.203482] >ffff888103a23e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.203905] ^ [ 14.204074] ffff888103a23e80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.204563] ffff888103a23f00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.204946] ==================================================================