Date
Feb. 5, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-armv7 | |
qemu-x86_64 |
[ 147.166365] ================================================================== [ 147.167147] BUG: KASAN: slab-use-after-free in kasan_strings+0x170/0x4ec [ 147.167833] Read of size 1 at addr c8fba210 by task kunit_try_catch/199 [ 147.168670] [ 147.168984] CPU: 1 PID: 199 Comm: kunit_try_catch Tainted: G B N 6.6.76-rc1 #1 [ 147.169866] Hardware name: Generic DT based system [ 147.170502] unwind_backtrace from show_stack+0x18/0x1c [ 147.171296] show_stack from dump_stack_lvl+0x58/0x70 [ 147.171996] dump_stack_lvl from print_report+0x164/0x51c [ 147.172611] print_report from kasan_report+0xc8/0x104 [ 147.173406] kasan_report from kasan_strings+0x170/0x4ec [ 147.174105] kasan_strings from kunit_try_run_case+0x11c/0x2e4 [ 147.174927] kunit_try_run_case from kunit_generic_run_threadfn_adapter+0x2c/0x48 [ 147.176295] kunit_generic_run_threadfn_adapter from kthread+0x184/0x1a8 [ 147.177200] kthread from ret_from_fork+0x14/0x30 [ 147.177825] Exception stack(0xfa0fbfb0 to 0xfa0fbff8) [ 147.178373] bfa0: 00000000 00000000 00000000 00000000 [ 147.179306] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 147.180255] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 147.180956] [ 147.181235] Allocated by task 199: [ 147.181640] kasan_set_track+0x3c/0x5c [ 147.182214] __kasan_kmalloc+0x8c/0x94 [ 147.182821] kasan_strings+0xa0/0x4ec [ 147.183317] kunit_try_run_case+0x11c/0x2e4 [ 147.183965] kunit_generic_run_threadfn_adapter+0x2c/0x48 [ 147.184709] kthread+0x184/0x1a8 [ 147.185159] ret_from_fork+0x14/0x30 [ 147.185832] [ 147.186169] Freed by task 199: [ 147.186516] kasan_set_track+0x3c/0x5c [ 147.187116] kasan_save_free_info+0x30/0x3c [ 147.187746] __kasan_slab_free+0xdc/0x124 [ 147.188521] __kmem_cache_free+0x140/0x2a8 [ 147.189288] kasan_strings+0xbc/0x4ec [ 147.189643] kunit_try_run_case+0x11c/0x2e4 [ 147.190409] kunit_generic_run_threadfn_adapter+0x2c/0x48 [ 147.191142] kthread+0x184/0x1a8 [ 147.191566] ret_from_fork+0x14/0x30 [ 147.192217] [ 147.192482] The buggy address belongs to the object at c8fba200 [ 147.192482] which belongs to the cache kmalloc-64 of size 64 [ 147.193514] The buggy address is located 16 bytes inside of [ 147.193514] freed 64-byte region [c8fba200, c8fba240) [ 147.194767] [ 147.195468] The buggy address belongs to the physical page: [ 147.196591] page:3fba6f39 refcount:1 mapcount:0 mapping:00000000 index:0x0 pfn:0x48fba [ 147.197514] flags: 0x800(slab|zone=0) [ 147.197929] page_type: 0xffffffff() [ 147.198412] raw: 00000800 c4801200 00000122 00000000 00000000 80200020 ffffffff 00000001 [ 147.199378] raw: 00000000 [ 147.199823] page dumped because: kasan: bad access detected [ 147.200451] [ 147.200704] Memory state around the buggy address: [ 147.201418] c8fba100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 147.202085] c8fba180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 147.203078] >c8fba200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 147.203755] ^ [ 147.204253] c8fba280: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 147.204968] c8fba300: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc [ 147.205928] ==================================================================
[ 50.414796] ================================================================== [ 50.416050] BUG: KASAN: slab-use-after-free in kasan_strings+0x19b/0x510 [ 50.417318] Read of size 1 at addr ffff8881028cedd0 by task kunit_try_catch/222 [ 50.418206] [ 50.418443] CPU: 1 PID: 222 Comm: kunit_try_catch Tainted: G B N 6.6.76-rc1 #1 [ 50.419435] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 50.420306] Call Trace: [ 50.420688] <TASK> [ 50.421309] dump_stack_lvl+0x4e/0x90 [ 50.422105] print_report+0xd2/0x660 [ 50.423094] ? __virt_addr_valid+0x156/0x1e0 [ 50.424314] ? kasan_complete_mode_report_info+0x64/0x200 [ 50.424964] kasan_report+0xff/0x140 [ 50.425902] ? kasan_strings+0x19b/0x510 [ 50.426688] ? kasan_strings+0x19b/0x510 [ 50.427492] __asan_load1+0x66/0x70 [ 50.428127] kasan_strings+0x19b/0x510 [ 50.428729] ? __pfx_kasan_strings+0x10/0x10 [ 50.429551] ? __schedule+0x70b/0x1190 [ 50.430213] ? ktime_get_ts64+0x118/0x140 [ 50.430714] kunit_try_run_case+0x126/0x290 [ 50.431321] ? __pfx_kunit_try_run_case+0x10/0x10 [ 50.432672] ? __kasan_check_write+0x18/0x20 [ 50.433442] ? trace_preempt_on+0x20/0xa0 [ 50.433980] ? __kthread_parkme+0x4f/0xd0 [ 50.434773] ? preempt_count_sub+0x50/0x80 [ 50.435574] ? __pfx_kunit_try_run_case+0x10/0x10 [ 50.436589] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 50.437522] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 50.438346] kthread+0x19e/0x1e0 [ 50.438933] ? __pfx_kthread+0x10/0x10 [ 50.439679] ret_from_fork+0x41/0x70 [ 50.440307] ? __pfx_kthread+0x10/0x10 [ 50.441196] ret_from_fork_asm+0x1b/0x30 [ 50.442012] </TASK> [ 50.442344] [ 50.442791] Allocated by task 222: [ 50.443486] kasan_save_stack+0x3c/0x60 [ 50.444286] kasan_set_track+0x29/0x40 [ 50.445001] kasan_save_alloc_info+0x22/0x30 [ 50.445635] __kasan_kmalloc+0xb7/0xc0 [ 50.446663] kmalloc_trace+0x4c/0xb0 [ 50.447384] kasan_strings+0x9f/0x510 [ 50.448260] kunit_try_run_case+0x126/0x290 [ 50.449010] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 50.450106] kthread+0x19e/0x1e0 [ 50.450501] ret_from_fork+0x41/0x70 [ 50.450909] ret_from_fork_asm+0x1b/0x30 [ 50.451494] [ 50.452655] Freed by task 222: [ 50.453344] kasan_save_stack+0x3c/0x60 [ 50.454169] kasan_set_track+0x29/0x40 [ 50.454827] kasan_save_free_info+0x2f/0x50 [ 50.455358] ____kasan_slab_free+0x172/0x1d0 [ 50.456127] __kasan_slab_free+0x16/0x20 [ 50.457203] __kmem_cache_free+0x190/0x310 [ 50.457732] kfree+0x7c/0x120 [ 50.458429] kasan_strings+0xc3/0x510 [ 50.459297] kunit_try_run_case+0x126/0x290 [ 50.459900] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 50.460707] kthread+0x19e/0x1e0 [ 50.461246] ret_from_fork+0x41/0x70 [ 50.461758] ret_from_fork_asm+0x1b/0x30 [ 50.462254] [ 50.462520] The buggy address belongs to the object at ffff8881028cedc0 [ 50.462520] which belongs to the cache kmalloc-32 of size 32 [ 50.464502] The buggy address is located 16 bytes inside of [ 50.464502] freed 32-byte region [ffff8881028cedc0, ffff8881028cede0) [ 50.465639] [ 50.465952] The buggy address belongs to the physical page: [ 50.466654] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028ce [ 50.468025] flags: 0x200000000000800(slab|node=0|zone=2) [ 50.468653] page_type: 0xffffffff() [ 50.469330] raw: 0200000000000800 ffff888100041500 dead000000000122 0000000000000000 [ 50.470111] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 50.470962] page dumped because: kasan: bad access detected [ 50.471683] [ 50.472007] Memory state around the buggy address: [ 50.472727] ffff8881028cec80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 50.473691] ffff8881028ced00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 50.475046] >ffff8881028ced80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 50.475730] ^ [ 50.476516] ffff8881028cee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 50.477439] ffff8881028cee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 50.478355] ==================================================================