Date
July 15, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.771987] ================================================================== [ 17.772044] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 17.772611] Read of size 1 at addr fff00000c5977b10 by task kunit_try_catch/260 [ 17.772681] [ 17.772715] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.773211] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.773450] Hardware name: linux,dummy-virt (DT) [ 17.773649] Call trace: [ 17.773684] show_stack+0x20/0x38 (C) [ 17.773741] dump_stack_lvl+0x8c/0xd0 [ 17.773790] print_report+0x118/0x5d0 [ 17.773839] kasan_report+0xdc/0x128 [ 17.773887] __asan_report_load1_noabort+0x20/0x30 [ 17.774087] strnlen+0x80/0x88 [ 17.774137] kasan_strings+0x478/0xb00 [ 17.774910] kunit_try_run_case+0x170/0x3f0 [ 17.775801] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.776129] kthread+0x328/0x630 [ 17.776197] ret_from_fork+0x10/0x20 [ 17.776249] [ 17.776271] Allocated by task 260: [ 17.777393] kasan_save_stack+0x3c/0x68 [ 17.777968] kasan_save_track+0x20/0x40 [ 17.779871] kasan_save_alloc_info+0x40/0x58 [ 17.779940] __kasan_kmalloc+0xd4/0xd8 [ 17.780225] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.780362] kasan_strings+0xc8/0xb00 [ 17.780402] kunit_try_run_case+0x170/0x3f0 [ 17.780442] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.780492] kthread+0x328/0x630 [ 17.780525] ret_from_fork+0x10/0x20 [ 17.781569] [ 17.781596] Freed by task 260: [ 17.781629] kasan_save_stack+0x3c/0x68 [ 17.781833] kasan_save_track+0x20/0x40 [ 17.782238] kasan_save_free_info+0x4c/0x78 [ 17.782294] __kasan_slab_free+0x6c/0x98 [ 17.782336] kfree+0x214/0x3c8 [ 17.782800] kasan_strings+0x24c/0xb00 [ 17.782854] kunit_try_run_case+0x170/0x3f0 [ 17.782902] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.783584] kthread+0x328/0x630 [ 17.783996] ret_from_fork+0x10/0x20 [ 17.784310] [ 17.784595] The buggy address belongs to the object at fff00000c5977b00 [ 17.784595] which belongs to the cache kmalloc-32 of size 32 [ 17.784894] The buggy address is located 16 bytes inside of [ 17.784894] freed 32-byte region [fff00000c5977b00, fff00000c5977b20) [ 17.784966] [ 17.785105] The buggy address belongs to the physical page: [ 17.785144] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105977 [ 17.785217] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.785268] page_type: f5(slab) [ 17.785307] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.785361] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.785601] page dumped because: kasan: bad access detected [ 17.785641] [ 17.785664] Memory state around the buggy address: [ 17.785709] fff00000c5977a00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.786045] fff00000c5977a80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.786136] >fff00000c5977b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.786543] ^ [ 17.787272] fff00000c5977b80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.787533] fff00000c5977c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.787583] ==================================================================
[ 14.510567] ================================================================== [ 14.510926] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.511162] Read of size 1 at addr ffff8881038e8050 by task kunit_try_catch/276 [ 14.511697] [ 14.511834] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 14.511878] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.511890] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.511911] Call Trace: [ 14.511924] <TASK> [ 14.511940] dump_stack_lvl+0x73/0xb0 [ 14.511970] print_report+0xd1/0x610 [ 14.511992] ? __virt_addr_valid+0x1db/0x2d0 [ 14.512014] ? strnlen+0x73/0x80 [ 14.512032] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.512055] ? strnlen+0x73/0x80 [ 14.512074] kasan_report+0x141/0x180 [ 14.512096] ? strnlen+0x73/0x80 [ 14.512118] __asan_report_load1_noabort+0x18/0x20 [ 14.512144] strnlen+0x73/0x80 [ 14.512164] kasan_strings+0x615/0xe80 [ 14.512185] ? trace_hardirqs_on+0x37/0xe0 [ 14.512210] ? __pfx_kasan_strings+0x10/0x10 [ 14.512231] ? finish_task_switch.isra.0+0x153/0x700 [ 14.512254] ? __switch_to+0x47/0xf50 [ 14.512279] ? __schedule+0x10cc/0x2b60 [ 14.512300] ? __pfx_read_tsc+0x10/0x10 [ 14.512321] ? ktime_get_ts64+0x86/0x230 [ 14.512347] kunit_try_run_case+0x1a5/0x480 [ 14.512372] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.512396] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.512421] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.512446] ? __kthread_parkme+0x82/0x180 [ 14.512467] ? preempt_count_sub+0x50/0x80 [ 14.512491] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.512516] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.512541] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.512567] kthread+0x337/0x6f0 [ 14.512587] ? trace_preempt_on+0x20/0xc0 [ 14.512610] ? __pfx_kthread+0x10/0x10 [ 14.512631] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.512716] ? calculate_sigpending+0x7b/0xa0 [ 14.512746] ? __pfx_kthread+0x10/0x10 [ 14.512780] ret_from_fork+0x116/0x1d0 [ 14.512799] ? __pfx_kthread+0x10/0x10 [ 14.512819] ret_from_fork_asm+0x1a/0x30 [ 14.512850] </TASK> [ 14.512859] [ 14.520853] Allocated by task 276: [ 14.521008] kasan_save_stack+0x45/0x70 [ 14.521155] kasan_save_track+0x18/0x40 [ 14.521291] kasan_save_alloc_info+0x3b/0x50 [ 14.521502] __kasan_kmalloc+0xb7/0xc0 [ 14.521692] __kmalloc_cache_noprof+0x189/0x420 [ 14.521938] kasan_strings+0xc0/0xe80 [ 14.522210] kunit_try_run_case+0x1a5/0x480 [ 14.522498] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.522707] kthread+0x337/0x6f0 [ 14.522883] ret_from_fork+0x116/0x1d0 [ 14.523076] ret_from_fork_asm+0x1a/0x30 [ 14.523237] [ 14.523318] Freed by task 276: [ 14.523650] kasan_save_stack+0x45/0x70 [ 14.523870] kasan_save_track+0x18/0x40 [ 14.524038] kasan_save_free_info+0x3f/0x60 [ 14.524239] __kasan_slab_free+0x56/0x70 [ 14.524501] kfree+0x222/0x3f0 [ 14.524623] kasan_strings+0x2aa/0xe80 [ 14.524767] kunit_try_run_case+0x1a5/0x480 [ 14.524915] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.525161] kthread+0x337/0x6f0 [ 14.525327] ret_from_fork+0x116/0x1d0 [ 14.525605] ret_from_fork_asm+0x1a/0x30 [ 14.525923] [ 14.526023] The buggy address belongs to the object at ffff8881038e8040 [ 14.526023] which belongs to the cache kmalloc-32 of size 32 [ 14.526643] The buggy address is located 16 bytes inside of [ 14.526643] freed 32-byte region [ffff8881038e8040, ffff8881038e8060) [ 14.527105] [ 14.527179] The buggy address belongs to the physical page: [ 14.527352] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e8 [ 14.527834] flags: 0x200000000000000(node=0|zone=2) [ 14.528032] page_type: f5(slab) [ 14.528153] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.528388] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.528617] page dumped because: kasan: bad access detected [ 14.528815] [ 14.528913] Memory state around the buggy address: [ 14.529138] ffff8881038e7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.529453] ffff8881038e7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.529907] >ffff8881038e8000: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.530217] ^ [ 14.530402] ffff8881038e8080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.530617] ffff8881038e8100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.530842] ==================================================================