Date
June 5, 2025, 7:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 28.819443] ================================================================== [ 28.819553] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 28.819662] Read of size 1 at addr fff00000c770c050 by task kunit_try_catch/259 [ 28.819791] [ 28.819862] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT [ 28.820066] Tainted: [B]=BAD_PAGE, [N]=TEST [ 28.820138] Hardware name: linux,dummy-virt (DT) [ 28.825352] Call trace: [ 28.825706] show_stack+0x20/0x38 (C) [ 28.825836] dump_stack_lvl+0x8c/0xd0 [ 28.826857] print_report+0x118/0x608 [ 28.827536] kasan_report+0xdc/0x128 [ 28.827671] __asan_report_load1_noabort+0x20/0x30 [ 28.827800] strlen+0xa8/0xb0 [ 28.827920] kasan_strings+0x418/0xb00 [ 28.828039] kunit_try_run_case+0x170/0x3f0 [ 28.829770] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 28.829936] kthread+0x328/0x630 [ 28.830891] ret_from_fork+0x10/0x20 [ 28.831473] [ 28.831779] Allocated by task 259: [ 28.831978] kasan_save_stack+0x3c/0x68 [ 28.832214] kasan_save_track+0x20/0x40 [ 28.832623] kasan_save_alloc_info+0x40/0x58 [ 28.833157] __kasan_kmalloc+0xd4/0xd8 [ 28.833263] __kmalloc_cache_noprof+0x16c/0x3c0 [ 28.833758] kasan_strings+0xc8/0xb00 [ 28.834492] kunit_try_run_case+0x170/0x3f0 [ 28.834604] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 28.834719] kthread+0x328/0x630 [ 28.835258] ret_from_fork+0x10/0x20 [ 28.835885] [ 28.836147] Freed by task 259: [ 28.836434] kasan_save_stack+0x3c/0x68 [ 28.836546] kasan_save_track+0x20/0x40 [ 28.836652] kasan_save_free_info+0x4c/0x78 [ 28.836768] __kasan_slab_free+0x6c/0x98 [ 28.837513] kfree+0x214/0x3c8 [ 28.838818] kasan_strings+0x24c/0xb00 [ 28.839015] kunit_try_run_case+0x170/0x3f0 [ 28.839478] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 28.839598] kthread+0x328/0x630 [ 28.839686] ret_from_fork+0x10/0x20 [ 28.840059] [ 28.840391] The buggy address belongs to the object at fff00000c770c040 [ 28.840391] which belongs to the cache kmalloc-32 of size 32 [ 28.841202] The buggy address is located 16 bytes inside of [ 28.841202] freed 32-byte region [fff00000c770c040, fff00000c770c060) [ 28.841493] [ 28.841550] The buggy address belongs to the physical page: [ 28.841632] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10770c [ 28.842300] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 28.842583] page_type: f5(slab) [ 28.842680] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 28.842811] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 28.842918] page dumped because: kasan: bad access detected [ 28.842999] [ 28.843888] Memory state around the buggy address: [ 28.844535] fff00000c770bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.844745] fff00000c770bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.844872] >fff00000c770c000: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 28.844984] ^ [ 28.845173] fff00000c770c080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 28.845413] fff00000c770c100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 28.845579] ==================================================================
[ 13.371747] ================================================================== [ 13.371993] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.372329] Read of size 1 at addr ffff88810278df50 by task kunit_try_catch/276 [ 13.372612] [ 13.372733] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT(voluntary) [ 13.372776] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.372787] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.372807] Call Trace: [ 13.372820] <TASK> [ 13.372836] dump_stack_lvl+0x73/0xb0 [ 13.372859] print_report+0xd1/0x650 [ 13.372881] ? __virt_addr_valid+0x1db/0x2d0 [ 13.372917] ? strlen+0x8f/0xb0 [ 13.372936] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.373029] ? strlen+0x8f/0xb0 [ 13.373054] kasan_report+0x141/0x180 [ 13.373077] ? strlen+0x8f/0xb0 [ 13.373099] __asan_report_load1_noabort+0x18/0x20 [ 13.373123] strlen+0x8f/0xb0 [ 13.373142] kasan_strings+0x57b/0xe80 [ 13.373162] ? trace_hardirqs_on+0x37/0xe0 [ 13.373184] ? __pfx_kasan_strings+0x10/0x10 [ 13.373204] ? finish_task_switch.isra.0+0x153/0x700 [ 13.373225] ? __switch_to+0x47/0xf50 [ 13.373249] ? __schedule+0x10cc/0x2b60 [ 13.373272] ? __pfx_read_tsc+0x10/0x10 [ 13.373292] ? ktime_get_ts64+0x86/0x230 [ 13.373316] kunit_try_run_case+0x1a5/0x480 [ 13.373336] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.373356] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.373379] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.373403] ? __kthread_parkme+0x82/0x180 [ 13.373423] ? preempt_count_sub+0x50/0x80 [ 13.373445] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.373466] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.373490] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.373515] kthread+0x337/0x6f0 [ 13.373533] ? trace_preempt_on+0x20/0xc0 [ 13.373555] ? __pfx_kthread+0x10/0x10 [ 13.373576] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.373598] ? calculate_sigpending+0x7b/0xa0 [ 13.373621] ? __pfx_kthread+0x10/0x10 [ 13.373642] ret_from_fork+0x116/0x1d0 [ 13.373660] ? __pfx_kthread+0x10/0x10 [ 13.373680] ret_from_fork_asm+0x1a/0x30 [ 13.373710] </TASK> [ 13.373719] [ 13.381837] Allocated by task 276: [ 13.382106] kasan_save_stack+0x45/0x70 [ 13.382319] kasan_save_track+0x18/0x40 [ 13.382513] kasan_save_alloc_info+0x3b/0x50 [ 13.382720] __kasan_kmalloc+0xb7/0xc0 [ 13.382854] __kmalloc_cache_noprof+0x189/0x420 [ 13.383024] kasan_strings+0xc0/0xe80 [ 13.383323] kunit_try_run_case+0x1a5/0x480 [ 13.383547] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.383858] kthread+0x337/0x6f0 [ 13.384110] ret_from_fork+0x116/0x1d0 [ 13.384276] ret_from_fork_asm+0x1a/0x30 [ 13.384461] [ 13.384532] Freed by task 276: [ 13.384709] kasan_save_stack+0x45/0x70 [ 13.384908] kasan_save_track+0x18/0x40 [ 13.385060] kasan_save_free_info+0x3f/0x60 [ 13.385336] __kasan_slab_free+0x56/0x70 [ 13.385513] kfree+0x222/0x3f0 [ 13.385637] kasan_strings+0x2aa/0xe80 [ 13.385828] kunit_try_run_case+0x1a5/0x480 [ 13.386006] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.386181] kthread+0x337/0x6f0 [ 13.386300] ret_from_fork+0x116/0x1d0 [ 13.386430] ret_from_fork_asm+0x1a/0x30 [ 13.386567] [ 13.386635] The buggy address belongs to the object at ffff88810278df40 [ 13.386635] which belongs to the cache kmalloc-32 of size 32 [ 13.387405] The buggy address is located 16 bytes inside of [ 13.387405] freed 32-byte region [ffff88810278df40, ffff88810278df60) [ 13.387927] [ 13.388214] The buggy address belongs to the physical page: [ 13.388439] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10278d [ 13.388851] flags: 0x200000000000000(node=0|zone=2) [ 13.389163] page_type: f5(slab) [ 13.389316] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.389599] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 13.389824] page dumped because: kasan: bad access detected [ 13.390206] [ 13.390303] Memory state around the buggy address: [ 13.390533] ffff88810278de00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.390986] ffff88810278de80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.391308] >ffff88810278df00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.391566] ^ [ 13.391818] ffff88810278df80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.392046] ffff88810278e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.392524] ==================================================================