Date
June 2, 2025, 2:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.169235] ================================================================== [ 22.169860] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 22.170535] Read of size 1 at addr fff00000c6cfdcd0 by task kunit_try_catch/246 [ 22.171272] [ 22.171827] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G B N 6.12.32-rc1 #1 [ 22.172051] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.172122] Hardware name: linux,dummy-virt (DT) [ 22.172197] Call trace: [ 22.172273] dump_backtrace+0x9c/0x128 [ 22.172389] show_stack+0x20/0x38 [ 22.172470] dump_stack_lvl+0x8c/0xd0 [ 22.172571] print_report+0x118/0x5f0 [ 22.172672] kasan_report+0xdc/0x128 [ 22.172767] __asan_report_load1_noabort+0x20/0x30 [ 22.172872] strcmp+0xc0/0xc8 [ 22.172967] kasan_strings+0x254/0x938 [ 22.173063] kunit_try_run_case+0x170/0x3f0 [ 22.173162] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.173286] kthread+0x24c/0x2d0 [ 22.173354] ret_from_fork+0x10/0x20 [ 22.173410] [ 22.178095] Allocated by task 246: [ 22.179583] kasan_save_stack+0x3c/0x68 [ 22.180045] kasan_save_track+0x20/0x40 [ 22.180336] kasan_save_alloc_info+0x40/0x58 [ 22.180706] __kasan_kmalloc+0xd4/0xd8 [ 22.181177] __kmalloc_cache_noprof+0x154/0x320 [ 22.181783] kasan_strings+0xb0/0x938 [ 22.182284] kunit_try_run_case+0x170/0x3f0 [ 22.182821] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.183328] kthread+0x24c/0x2d0 [ 22.183757] ret_from_fork+0x10/0x20 [ 22.184811] [ 22.185308] Freed by task 246: [ 22.185709] kasan_save_stack+0x3c/0x68 [ 22.186655] kasan_save_track+0x20/0x40 [ 22.187230] kasan_save_free_info+0x4c/0x78 [ 22.187680] __kasan_slab_free+0x6c/0x98 [ 22.188573] kfree+0x110/0x3b8 [ 22.188941] kasan_strings+0x128/0x938 [ 22.189461] kunit_try_run_case+0x170/0x3f0 [ 22.189940] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.190489] kthread+0x24c/0x2d0 [ 22.190978] ret_from_fork+0x10/0x20 [ 22.191412] [ 22.192010] The buggy address belongs to the object at fff00000c6cfdcc0 [ 22.192010] which belongs to the cache kmalloc-32 of size 32 [ 22.193307] The buggy address is located 16 bytes inside of [ 22.193307] freed 32-byte region [fff00000c6cfdcc0, fff00000c6cfdce0) [ 22.194333] [ 22.194655] The buggy address belongs to the physical page: [ 22.195097] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cfd [ 22.195991] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.196371] page_type: f5(slab) [ 22.196595] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 22.196961] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 22.197958] page dumped because: kasan: bad access detected [ 22.198565] [ 22.198692] Memory state around the buggy address: [ 22.198875] fff00000c6cfdb80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 22.199504] fff00000c6cfdc00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 22.200696] >fff00000c6cfdc80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.201414] ^ [ 22.201833] fff00000c6cfdd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.202374] fff00000c6cfdd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.203019] ==================================================================
[ 14.060415] ================================================================== [ 14.060676] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.060924] Read of size 1 at addr ffff888102632890 by task kunit_try_catch/264 [ 14.061173] [ 14.061233] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G B N 6.12.32-rc1 #1 [ 14.061273] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.061284] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.061304] Call Trace: [ 14.061317] <TASK> [ 14.061332] dump_stack_lvl+0x73/0xb0 [ 14.061353] print_report+0xd1/0x640 [ 14.061375] ? __virt_addr_valid+0x1db/0x2d0 [ 14.061396] ? strcmp+0xb0/0xc0 [ 14.061413] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.061434] ? strcmp+0xb0/0xc0 [ 14.061452] kasan_report+0x140/0x180 [ 14.061474] ? strcmp+0xb0/0xc0 [ 14.061496] __asan_report_load1_noabort+0x18/0x20 [ 14.061516] strcmp+0xb0/0xc0 [ 14.061535] kasan_strings+0x2e9/0xb60 [ 14.061555] ? __pfx_kasan_strings+0x10/0x10 [ 14.061576] ? __schedule+0xc49/0x27a0 [ 14.061595] ? __pfx_read_tsc+0x10/0x10 [ 14.061612] ? ktime_get_ts64+0x84/0x230 [ 14.061637] kunit_try_run_case+0x1a6/0x480 [ 14.061657] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.061988] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 14.062015] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.062042] ? __kthread_parkme+0x82/0x160 [ 14.062085] ? preempt_count_sub+0x50/0x80 [ 14.062110] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.062130] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.062156] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.062182] kthread+0x257/0x310 [ 14.062200] ? __pfx_kthread+0x10/0x10 [ 14.062219] ret_from_fork+0x41/0x80 [ 14.062238] ? __pfx_kthread+0x10/0x10 [ 14.062255] ret_from_fork_asm+0x1a/0x30 [ 14.062284] </TASK> [ 14.062296] [ 14.066939] Allocated by task 264: [ 14.067021] kasan_save_stack+0x45/0x70 [ 14.067130] kasan_save_track+0x18/0x40 [ 14.067360] kasan_save_alloc_info+0x3b/0x50 [ 14.067597] __kasan_kmalloc+0xb7/0xc0 [ 14.067823] __kmalloc_cache_noprof+0x168/0x350 [ 14.068042] kasan_strings+0xb3/0xb60 [ 14.068143] kunit_try_run_case+0x1a6/0x480 [ 14.068354] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.068593] kthread+0x257/0x310 [ 14.068704] ret_from_fork+0x41/0x80 [ 14.068901] ret_from_fork_asm+0x1a/0x30 [ 14.068992] [ 14.069040] Freed by task 264: [ 14.069165] kasan_save_stack+0x45/0x70 [ 14.069386] kasan_save_track+0x18/0x40 [ 14.069631] kasan_save_free_info+0x3f/0x60 [ 14.069770] __kasan_slab_free+0x56/0x70 [ 14.069861] kfree+0x123/0x3d0 [ 14.069947] kasan_strings+0x13a/0xb60 [ 14.070038] kunit_try_run_case+0x1a6/0x480 [ 14.070146] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.070253] kthread+0x257/0x310 [ 14.070326] ret_from_fork+0x41/0x80 [ 14.070406] ret_from_fork_asm+0x1a/0x30 [ 14.070488] [ 14.070534] The buggy address belongs to the object at ffff888102632880 [ 14.070534] which belongs to the cache kmalloc-32 of size 32 [ 14.070841] The buggy address is located 16 bytes inside of [ 14.070841] freed 32-byte region [ffff888102632880, ffff8881026328a0) [ 14.071426] [ 14.071537] The buggy address belongs to the physical page: [ 14.071839] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102632 [ 14.072218] flags: 0x200000000000000(node=0|zone=2) [ 14.072500] page_type: f5(slab) [ 14.072703] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.073118] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 14.073449] page dumped because: kasan: bad access detected [ 14.073602] [ 14.073653] Memory state around the buggy address: [ 14.073754] ffff888102632780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.073878] ffff888102632800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.074005] >ffff888102632880: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 14.074146] ^ [ 14.074228] ffff888102632900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.074399] ffff888102632980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.074721] ==================================================================