Date
July 18, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.676123] ================================================================== [ 17.676184] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 17.676424] Read of size 1 at addr fff00000c7848510 by task kunit_try_catch/259 [ 17.676515] [ 17.676559] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.676811] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.676853] Hardware name: linux,dummy-virt (DT) [ 17.676888] Call trace: [ 17.676932] show_stack+0x20/0x38 (C) [ 17.677074] dump_stack_lvl+0x8c/0xd0 [ 17.677126] print_report+0x118/0x5d0 [ 17.677321] kasan_report+0xdc/0x128 [ 17.677715] __asan_report_load1_noabort+0x20/0x30 [ 17.677969] strlen+0xa8/0xb0 [ 17.678101] kasan_strings+0x418/0xb00 [ 17.678155] kunit_try_run_case+0x170/0x3f0 [ 17.678205] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.678465] kthread+0x328/0x630 [ 17.678603] ret_from_fork+0x10/0x20 [ 17.678656] [ 17.678677] Allocated by task 259: [ 17.678959] kasan_save_stack+0x3c/0x68 [ 17.679245] kasan_save_track+0x20/0x40 [ 17.679401] kasan_save_alloc_info+0x40/0x58 [ 17.679489] __kasan_kmalloc+0xd4/0xd8 [ 17.679595] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.680000] kasan_strings+0xc8/0xb00 [ 17.680198] kunit_try_run_case+0x170/0x3f0 [ 17.680410] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.680537] kthread+0x328/0x630 [ 17.680600] ret_from_fork+0x10/0x20 [ 17.680639] [ 17.680663] Freed by task 259: [ 17.680695] kasan_save_stack+0x3c/0x68 [ 17.680736] kasan_save_track+0x20/0x40 [ 17.680826] kasan_save_free_info+0x4c/0x78 [ 17.680880] __kasan_slab_free+0x6c/0x98 [ 17.680927] kfree+0x214/0x3c8 [ 17.680982] kasan_strings+0x24c/0xb00 [ 17.681018] kunit_try_run_case+0x170/0x3f0 [ 17.681067] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.681114] kthread+0x328/0x630 [ 17.681153] ret_from_fork+0x10/0x20 [ 17.681205] [ 17.681236] The buggy address belongs to the object at fff00000c7848500 [ 17.681236] which belongs to the cache kmalloc-32 of size 32 [ 17.681586] The buggy address is located 16 bytes inside of [ 17.681586] freed 32-byte region [fff00000c7848500, fff00000c7848520) [ 17.681679] [ 17.681702] The buggy address belongs to the physical page: [ 17.681734] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107848 [ 17.682337] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.682561] page_type: f5(slab) [ 17.682624] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.682684] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.682901] page dumped because: kasan: bad access detected [ 17.683100] [ 17.683224] Memory state around the buggy address: [ 17.683374] fff00000c7848400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.683549] fff00000c7848480: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 17.683780] >fff00000c7848500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.683845] ^ [ 17.683897] fff00000c7848580: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.684250] fff00000c7848600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.684409] ==================================================================
[ 14.151891] ================================================================== [ 14.152537] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 14.152955] Read of size 1 at addr ffff888103a23e10 by task kunit_try_catch/278 [ 14.153409] [ 14.153547] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 14.153593] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.153606] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.153627] Call Trace: [ 14.153642] <TASK> [ 14.153656] dump_stack_lvl+0x73/0xb0 [ 14.153684] print_report+0xd1/0x610 [ 14.153705] ? __virt_addr_valid+0x1db/0x2d0 [ 14.153924] ? strlen+0x8f/0xb0 [ 14.153945] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.153968] ? strlen+0x8f/0xb0 [ 14.153985] kasan_report+0x141/0x180 [ 14.154031] ? strlen+0x8f/0xb0 [ 14.154052] __asan_report_load1_noabort+0x18/0x20 [ 14.154077] strlen+0x8f/0xb0 [ 14.154094] kasan_strings+0x57b/0xe80 [ 14.154113] ? trace_hardirqs_on+0x37/0xe0 [ 14.154137] ? __pfx_kasan_strings+0x10/0x10 [ 14.154157] ? finish_task_switch.isra.0+0x153/0x700 [ 14.154180] ? __switch_to+0x47/0xf50 [ 14.154206] ? __schedule+0x10cc/0x2b60 [ 14.154227] ? __pfx_read_tsc+0x10/0x10 [ 14.154248] ? ktime_get_ts64+0x86/0x230 [ 14.154271] kunit_try_run_case+0x1a5/0x480 [ 14.154305] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.154328] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.154352] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.154375] ? __kthread_parkme+0x82/0x180 [ 14.154395] ? preempt_count_sub+0x50/0x80 [ 14.154417] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.154441] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.154485] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.154509] kthread+0x337/0x6f0 [ 14.154528] ? trace_preempt_on+0x20/0xc0 [ 14.154550] ? __pfx_kthread+0x10/0x10 [ 14.154570] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.154591] ? calculate_sigpending+0x7b/0xa0 [ 14.154614] ? __pfx_kthread+0x10/0x10 [ 14.154634] ret_from_fork+0x116/0x1d0 [ 14.154653] ? __pfx_kthread+0x10/0x10 [ 14.154672] ret_from_fork_asm+0x1a/0x30 [ 14.154702] </TASK> [ 14.154712] [ 14.164970] Allocated by task 278: [ 14.165218] kasan_save_stack+0x45/0x70 [ 14.165439] kasan_save_track+0x18/0x40 [ 14.165804] kasan_save_alloc_info+0x3b/0x50 [ 14.166030] __kasan_kmalloc+0xb7/0xc0 [ 14.166234] __kmalloc_cache_noprof+0x189/0x420 [ 14.166428] kasan_strings+0xc0/0xe80 [ 14.166883] kunit_try_run_case+0x1a5/0x480 [ 14.167107] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.167663] kthread+0x337/0x6f0 [ 14.167810] ret_from_fork+0x116/0x1d0 [ 14.168184] ret_from_fork_asm+0x1a/0x30 [ 14.168401] [ 14.168604] Freed by task 278: [ 14.168736] kasan_save_stack+0x45/0x70 [ 14.168938] kasan_save_track+0x18/0x40 [ 14.169109] kasan_save_free_info+0x3f/0x60 [ 14.169322] __kasan_slab_free+0x56/0x70 [ 14.169501] kfree+0x222/0x3f0 [ 14.169636] kasan_strings+0x2aa/0xe80 [ 14.169810] kunit_try_run_case+0x1a5/0x480 [ 14.170022] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.170234] kthread+0x337/0x6f0 [ 14.170970] ret_from_fork+0x116/0x1d0 [ 14.171137] ret_from_fork_asm+0x1a/0x30 [ 14.171415] [ 14.171492] The buggy address belongs to the object at ffff888103a23e00 [ 14.171492] which belongs to the cache kmalloc-32 of size 32 [ 14.172288] The buggy address is located 16 bytes inside of [ 14.172288] freed 32-byte region [ffff888103a23e00, ffff888103a23e20) [ 14.172974] [ 14.173104] The buggy address belongs to the physical page: [ 14.173443] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a23 [ 14.173960] flags: 0x200000000000000(node=0|zone=2) [ 14.174254] page_type: f5(slab) [ 14.174389] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.174883] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 14.175380] page dumped because: kasan: bad access detected [ 14.175712] [ 14.175793] Memory state around the buggy address: [ 14.176075] ffff888103a23d00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.176464] ffff888103a23d80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.176887] >ffff888103a23e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.177171] ^ [ 14.177468] ffff888103a23e80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.177874] ffff888103a23f00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.178143] ==================================================================