Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 24.058659] ================================================================== [ 24.059488] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 24.060074] Read of size 1 at addr fff00000c41f1950 by task kunit_try_catch/247 [ 24.060839] [ 24.061203] CPU: 1 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 24.061784] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.061873] Hardware name: linux,dummy-virt (DT) [ 24.061984] Call trace: [ 24.062062] dump_backtrace+0x9c/0x128 [ 24.062193] show_stack+0x20/0x38 [ 24.062313] dump_stack_lvl+0x8c/0xd0 [ 24.062438] print_report+0x118/0x5f0 [ 24.062560] kasan_report+0xdc/0x128 [ 24.062683] __asan_report_load1_noabort+0x20/0x30 [ 24.062764] strcmp+0xc0/0xc8 [ 24.062812] kasan_strings+0x254/0x938 [ 24.062860] kunit_try_run_case+0x170/0x3f0 [ 24.062910] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.062992] kthread+0x24c/0x2d0 [ 24.063045] ret_from_fork+0x10/0x20 [ 24.063098] [ 24.071052] Allocated by task 247: [ 24.071562] kasan_save_stack+0x3c/0x68 [ 24.072164] kasan_save_track+0x20/0x40 [ 24.072688] kasan_save_alloc_info+0x40/0x58 [ 24.073308] __kasan_kmalloc+0xd4/0xd8 [ 24.073888] __kmalloc_cache_noprof+0x154/0x320 [ 24.075295] kasan_strings+0xb0/0x938 [ 24.075861] kunit_try_run_case+0x170/0x3f0 [ 24.076402] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.077173] kthread+0x24c/0x2d0 [ 24.077667] ret_from_fork+0x10/0x20 [ 24.078281] [ 24.078645] Freed by task 247: [ 24.079110] kasan_save_stack+0x3c/0x68 [ 24.080241] kasan_save_track+0x20/0x40 [ 24.080763] kasan_save_free_info+0x4c/0x78 [ 24.081703] __kasan_slab_free+0x6c/0x98 [ 24.082354] kfree+0x110/0x3b8 [ 24.082955] kasan_strings+0x128/0x938 [ 24.083476] kunit_try_run_case+0x170/0x3f0 [ 24.084364] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.084853] kthread+0x24c/0x2d0 [ 24.085191] ret_from_fork+0x10/0x20 [ 24.085533] [ 24.085738] The buggy address belongs to the object at fff00000c41f1940 [ 24.085738] which belongs to the cache kmalloc-32 of size 32 [ 24.086711] The buggy address is located 16 bytes inside of [ 24.086711] freed 32-byte region [fff00000c41f1940, fff00000c41f1960) [ 24.088061] [ 24.089049] The buggy address belongs to the physical page: [ 24.089747] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1041f1 [ 24.090624] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 24.091408] page_type: f5(slab) [ 24.091909] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 24.094083] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 24.094626] page dumped because: kasan: bad access detected [ 24.095102] [ 24.095331] Memory state around the buggy address: [ 24.098873] fff00000c41f1800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 24.100980] fff00000c41f1880: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 24.103044] >fff00000c41f1900: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 24.105087] ^ [ 24.105986] fff00000c41f1980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.106770] fff00000c41f1a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.107536] ==================================================================
[ 20.769160] ================================================================== [ 20.770664] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 20.771475] Read of size 1 at addr ffff888102af74d0 by task kunit_try_catch/264 [ 20.772411] [ 20.773864] CPU: 1 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 20.774307] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.774325] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.774358] Call Trace: [ 20.774377] <TASK> [ 20.774397] dump_stack_lvl+0x73/0xb0 [ 20.774438] print_report+0xd1/0x640 [ 20.774563] ? __virt_addr_valid+0x1db/0x2d0 [ 20.774632] ? strcmp+0xb0/0xc0 [ 20.774668] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.774700] ? strcmp+0xb0/0xc0 [ 20.774727] kasan_report+0x140/0x180 [ 20.774762] ? strcmp+0xb0/0xc0 [ 20.774794] __asan_report_load1_noabort+0x18/0x20 [ 20.774858] strcmp+0xb0/0xc0 [ 20.774892] kasan_strings+0x2e9/0xb60 [ 20.774924] ? __pfx_kasan_strings+0x10/0x10 [ 20.774957] ? __schedule+0xc49/0x27a0 [ 20.774988] ? __pfx_read_tsc+0x10/0x10 [ 20.775016] ? ktime_get_ts64+0x84/0x230 [ 20.775053] kunit_try_run_case+0x1a6/0x480 [ 20.775085] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.775114] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 20.775142] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 20.775178] ? __kthread_parkme+0x82/0x160 [ 20.775205] ? preempt_count_sub+0x50/0x80 [ 20.775280] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.775313] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 20.775351] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.775388] kthread+0x257/0x310 [ 20.775414] ? __pfx_kthread+0x10/0x10 [ 20.775447] ret_from_fork+0x41/0x80 [ 20.775601] ? __pfx_kthread+0x10/0x10 [ 20.775630] ret_from_fork_asm+0x1a/0x30 [ 20.775671] </TASK> [ 20.775685] [ 20.797381] Allocated by task 264: [ 20.798326] kasan_save_stack+0x45/0x70 [ 20.798913] kasan_save_track+0x18/0x40 [ 20.799246] kasan_save_alloc_info+0x3b/0x50 [ 20.800058] __kasan_kmalloc+0xb7/0xc0 [ 20.800462] __kmalloc_cache_noprof+0x168/0x350 [ 20.801808] kasan_strings+0xb3/0xb60 [ 20.802339] kunit_try_run_case+0x1a6/0x480 [ 20.802821] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.803594] kthread+0x257/0x310 [ 20.803932] ret_from_fork+0x41/0x80 [ 20.804344] ret_from_fork_asm+0x1a/0x30 [ 20.804701] [ 20.806085] Freed by task 264: [ 20.806507] kasan_save_stack+0x45/0x70 [ 20.806812] kasan_save_track+0x18/0x40 [ 20.807106] kasan_save_free_info+0x3f/0x60 [ 20.807436] __kasan_slab_free+0x56/0x70 [ 20.807700] kfree+0x123/0x3d0 [ 20.807925] kasan_strings+0x13a/0xb60 [ 20.808183] kunit_try_run_case+0x1a6/0x480 [ 20.809201] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.810749] kthread+0x257/0x310 [ 20.811145] ret_from_fork+0x41/0x80 [ 20.811427] ret_from_fork_asm+0x1a/0x30 [ 20.812216] [ 20.812761] The buggy address belongs to the object at ffff888102af74c0 [ 20.812761] which belongs to the cache kmalloc-32 of size 32 [ 20.813881] The buggy address is located 16 bytes inside of [ 20.813881] freed 32-byte region [ffff888102af74c0, ffff888102af74e0) [ 20.817926] [ 20.818095] The buggy address belongs to the physical page: [ 20.818604] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102af7 [ 20.819196] flags: 0x200000000000000(node=0|zone=2) [ 20.819918] page_type: f5(slab) [ 20.820285] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.821430] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 20.822042] page dumped because: kasan: bad access detected [ 20.823184] [ 20.823430] Memory state around the buggy address: [ 20.824159] ffff888102af7380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.824955] ffff888102af7400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.825338] >ffff888102af7480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.827628] ^ [ 20.828533] ffff888102af7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.828920] ffff888102af7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.829593] ==================================================================