Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 23.970242] ================================================================== [ 23.971243] BUG: KASAN: slab-use-after-free in strchr+0xcc/0xd8 [ 23.972323] Read of size 1 at addr fff00000c41f1950 by task kunit_try_catch/247 [ 23.973080] [ 23.973414] CPU: 1 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 23.973584] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.973624] Hardware name: linux,dummy-virt (DT) [ 23.973672] Call trace: [ 23.974270] dump_backtrace+0x9c/0x128 [ 23.974405] show_stack+0x20/0x38 [ 23.974473] dump_stack_lvl+0x8c/0xd0 [ 23.974529] print_report+0x118/0x5f0 [ 23.974578] kasan_report+0xdc/0x128 [ 23.974625] __asan_report_load1_noabort+0x20/0x30 [ 23.974678] strchr+0xcc/0xd8 [ 23.974726] kasan_strings+0x18c/0x938 [ 23.974776] kunit_try_run_case+0x170/0x3f0 [ 23.974826] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.974883] kthread+0x24c/0x2d0 [ 23.974929] ret_from_fork+0x10/0x20 [ 23.975016] [ 23.984332] Allocated by task 247: [ 23.984911] kasan_save_stack+0x3c/0x68 [ 23.985490] kasan_save_track+0x20/0x40 [ 23.986137] kasan_save_alloc_info+0x40/0x58 [ 23.986706] __kasan_kmalloc+0xd4/0xd8 [ 23.987241] __kmalloc_cache_noprof+0x154/0x320 [ 23.988790] kasan_strings+0xb0/0x938 [ 23.989433] kunit_try_run_case+0x170/0x3f0 [ 23.989849] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.990653] kthread+0x24c/0x2d0 [ 23.991203] ret_from_fork+0x10/0x20 [ 23.991984] [ 23.992582] Freed by task 247: [ 23.993063] kasan_save_stack+0x3c/0x68 [ 23.993585] kasan_save_track+0x20/0x40 [ 23.994113] kasan_save_free_info+0x4c/0x78 [ 23.994643] __kasan_slab_free+0x6c/0x98 [ 23.995152] kfree+0x110/0x3b8 [ 23.995653] kasan_strings+0x128/0x938 [ 23.996145] kunit_try_run_case+0x170/0x3f0 [ 23.996731] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.998118] kthread+0x24c/0x2d0 [ 23.998612] ret_from_fork+0x10/0x20 [ 23.999079] [ 23.999411] The buggy address belongs to the object at fff00000c41f1940 [ 23.999411] which belongs to the cache kmalloc-32 of size 32 [ 24.000938] The buggy address is located 16 bytes inside of [ 24.000938] freed 32-byte region [fff00000c41f1940, fff00000c41f1960) [ 24.002092] [ 24.002398] The buggy address belongs to the physical page: [ 24.002943] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1041f1 [ 24.004692] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 24.005426] page_type: f5(slab) [ 24.005905] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 24.006699] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 24.007762] page dumped because: kasan: bad access detected [ 24.008398] [ 24.008718] Memory state around the buggy address: [ 24.009305] fff00000c41f1800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 24.010009] fff00000c41f1880: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 24.010769] >fff00000c41f1900: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 24.011520] ^ [ 24.012535] fff00000c41f1980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.012872] fff00000c41f1a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.013583] ==================================================================
[ 20.668154] ================================================================== [ 20.669918] BUG: KASAN: slab-use-after-free in strchr+0x9c/0xc0 [ 20.670462] Read of size 1 at addr ffff888102af74d0 by task kunit_try_catch/264 [ 20.671926] [ 20.672140] CPU: 1 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 20.672263] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.672303] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.672611] Call Trace: [ 20.672641] <TASK> [ 20.672667] dump_stack_lvl+0x73/0xb0 [ 20.672709] print_report+0xd1/0x640 [ 20.672748] ? __virt_addr_valid+0x1db/0x2d0 [ 20.672785] ? strchr+0x9c/0xc0 [ 20.672818] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.672885] ? strchr+0x9c/0xc0 [ 20.672915] kasan_report+0x140/0x180 [ 20.672951] ? strchr+0x9c/0xc0 [ 20.672984] __asan_report_load1_noabort+0x18/0x20 [ 20.673017] strchr+0x9c/0xc0 [ 20.673046] kasan_strings+0x1b1/0xb60 [ 20.673080] ? __pfx_kasan_strings+0x10/0x10 [ 20.673113] ? __schedule+0xc49/0x27a0 [ 20.673141] ? __pfx_read_tsc+0x10/0x10 [ 20.673169] ? ktime_get_ts64+0x84/0x230 [ 20.673206] kunit_try_run_case+0x1a6/0x480 [ 20.673270] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.673300] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 20.673329] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 20.673366] ? __kthread_parkme+0x82/0x160 [ 20.673394] ? preempt_count_sub+0x50/0x80 [ 20.673425] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.673494] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 20.673579] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.673620] kthread+0x257/0x310 [ 20.673645] ? __pfx_kthread+0x10/0x10 [ 20.673671] ret_from_fork+0x41/0x80 [ 20.673699] ? __pfx_kthread+0x10/0x10 [ 20.673724] ret_from_fork_asm+0x1a/0x30 [ 20.673766] </TASK> [ 20.673780] [ 20.693054] Allocated by task 264: [ 20.693255] kasan_save_stack+0x45/0x70 [ 20.693459] kasan_save_track+0x18/0x40 [ 20.693758] kasan_save_alloc_info+0x3b/0x50 [ 20.694212] __kasan_kmalloc+0xb7/0xc0 [ 20.694909] __kmalloc_cache_noprof+0x168/0x350 [ 20.695098] kasan_strings+0xb3/0xb60 [ 20.695753] kunit_try_run_case+0x1a6/0x480 [ 20.696926] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.698279] kthread+0x257/0x310 [ 20.698649] ret_from_fork+0x41/0x80 [ 20.699041] ret_from_fork_asm+0x1a/0x30 [ 20.699850] [ 20.700041] Freed by task 264: [ 20.700408] kasan_save_stack+0x45/0x70 [ 20.700782] kasan_save_track+0x18/0x40 [ 20.701202] kasan_save_free_info+0x3f/0x60 [ 20.701597] __kasan_slab_free+0x56/0x70 [ 20.702109] kfree+0x123/0x3d0 [ 20.702437] kasan_strings+0x13a/0xb60 [ 20.702852] kunit_try_run_case+0x1a6/0x480 [ 20.703280] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.704549] kthread+0x257/0x310 [ 20.705233] ret_from_fork+0x41/0x80 [ 20.705622] ret_from_fork_asm+0x1a/0x30 [ 20.706144] [ 20.706427] The buggy address belongs to the object at ffff888102af74c0 [ 20.706427] which belongs to the cache kmalloc-32 of size 32 [ 20.707538] The buggy address is located 16 bytes inside of [ 20.707538] freed 32-byte region [ffff888102af74c0, ffff888102af74e0) [ 20.709064] [ 20.709289] The buggy address belongs to the physical page: [ 20.709853] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102af7 [ 20.710399] flags: 0x200000000000000(node=0|zone=2) [ 20.710879] page_type: f5(slab) [ 20.711314] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.711872] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 20.712540] page dumped because: kasan: bad access detected [ 20.712982] [ 20.713162] Memory state around the buggy address: [ 20.714568] ffff888102af7380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.715276] ffff888102af7400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.716369] >ffff888102af7480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.717004] ^ [ 20.717498] ffff888102af7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.718391] ffff888102af7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.718950] ==================================================================