Date
July 8, 2025, 7:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.639241] ================================================================== [ 21.639576] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 21.639794] Read of size 1 at addr fff00000c56a2110 by task kunit_try_catch/259 [ 21.639909] [ 21.640094] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 21.640680] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.640916] Hardware name: linux,dummy-virt (DT) [ 21.640960] Call trace: [ 21.641036] show_stack+0x20/0x38 (C) [ 21.641120] dump_stack_lvl+0x8c/0xd0 [ 21.641204] print_report+0x118/0x608 [ 21.641409] kasan_report+0xdc/0x128 [ 21.641572] __asan_report_load1_noabort+0x20/0x30 [ 21.641872] strnlen+0x80/0x88 [ 21.641934] kasan_strings+0x478/0xb00 [ 21.642099] kunit_try_run_case+0x170/0x3f0 [ 21.642163] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.642484] kthread+0x328/0x630 [ 21.642772] ret_from_fork+0x10/0x20 [ 21.642885] [ 21.643024] Allocated by task 259: [ 21.643132] kasan_save_stack+0x3c/0x68 [ 21.643326] kasan_save_track+0x20/0x40 [ 21.643555] kasan_save_alloc_info+0x40/0x58 [ 21.643650] __kasan_kmalloc+0xd4/0xd8 [ 21.643798] __kmalloc_cache_noprof+0x16c/0x3c0 [ 21.643981] kasan_strings+0xc8/0xb00 [ 21.644113] kunit_try_run_case+0x170/0x3f0 [ 21.644171] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.644218] kthread+0x328/0x630 [ 21.644287] ret_from_fork+0x10/0x20 [ 21.644326] [ 21.644485] Freed by task 259: [ 21.644618] kasan_save_stack+0x3c/0x68 [ 21.644883] kasan_save_track+0x20/0x40 [ 21.644950] kasan_save_free_info+0x4c/0x78 [ 21.645084] __kasan_slab_free+0x6c/0x98 [ 21.645228] kfree+0x214/0x3c8 [ 21.645419] kasan_strings+0x24c/0xb00 [ 21.645609] kunit_try_run_case+0x170/0x3f0 [ 21.645680] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.645843] kthread+0x328/0x630 [ 21.645915] ret_from_fork+0x10/0x20 [ 21.646060] [ 21.646082] The buggy address belongs to the object at fff00000c56a2100 [ 21.646082] which belongs to the cache kmalloc-32 of size 32 [ 21.646188] The buggy address is located 16 bytes inside of [ 21.646188] freed 32-byte region [fff00000c56a2100, fff00000c56a2120) [ 21.646433] [ 21.646728] The buggy address belongs to the physical page: [ 21.646837] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056a2 [ 21.646945] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.647157] page_type: f5(slab) [ 21.647228] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 21.647325] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.647583] page dumped because: kasan: bad access detected [ 21.647649] [ 21.647846] Memory state around the buggy address: [ 21.647941] fff00000c56a2000: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.647988] fff00000c56a2080: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 21.648031] >fff00000c56a2100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.648471] ^ [ 21.648617] fff00000c56a2180: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.648728] fff00000c56a2200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.648840] ==================================================================
[ 15.011191] ================================================================== [ 15.011677] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 15.011960] Read of size 1 at addr ffff888102b12e50 by task kunit_try_catch/276 [ 15.012246] [ 15.012337] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 15.012382] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.012394] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.012415] Call Trace: [ 15.012433] <TASK> [ 15.012451] dump_stack_lvl+0x73/0xb0 [ 15.012476] print_report+0xd1/0x650 [ 15.012497] ? __virt_addr_valid+0x1db/0x2d0 [ 15.012680] ? strnlen+0x73/0x80 [ 15.012705] ? kasan_complete_mode_report_info+0x64/0x200 [ 15.012732] ? strnlen+0x73/0x80 [ 15.012749] kasan_report+0x141/0x180 [ 15.012771] ? strnlen+0x73/0x80 [ 15.012794] __asan_report_load1_noabort+0x18/0x20 [ 15.012819] strnlen+0x73/0x80 [ 15.012837] kasan_strings+0x615/0xe80 [ 15.012856] ? trace_hardirqs_on+0x37/0xe0 [ 15.012879] ? __pfx_kasan_strings+0x10/0x10 [ 15.012898] ? finish_task_switch.isra.0+0x153/0x700 [ 15.012919] ? __switch_to+0x47/0xf50 [ 15.012944] ? __schedule+0x10cc/0x2b60 [ 15.012966] ? __pfx_read_tsc+0x10/0x10 [ 15.012986] ? ktime_get_ts64+0x86/0x230 [ 15.013009] kunit_try_run_case+0x1a5/0x480 [ 15.013032] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.013110] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.013135] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.013158] ? __kthread_parkme+0x82/0x180 [ 15.013178] ? preempt_count_sub+0x50/0x80 [ 15.013200] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.013223] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.013246] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.013269] kthread+0x337/0x6f0 [ 15.013288] ? trace_preempt_on+0x20/0xc0 [ 15.013309] ? __pfx_kthread+0x10/0x10 [ 15.013329] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.013349] ? calculate_sigpending+0x7b/0xa0 [ 15.013372] ? __pfx_kthread+0x10/0x10 [ 15.013393] ret_from_fork+0x116/0x1d0 [ 15.013411] ? __pfx_kthread+0x10/0x10 [ 15.013430] ret_from_fork_asm+0x1a/0x30 [ 15.013461] </TASK> [ 15.013473] [ 15.022100] Allocated by task 276: [ 15.022249] kasan_save_stack+0x45/0x70 [ 15.022401] kasan_save_track+0x18/0x40 [ 15.022536] kasan_save_alloc_info+0x3b/0x50 [ 15.022909] __kasan_kmalloc+0xb7/0xc0 [ 15.023287] __kmalloc_cache_noprof+0x189/0x420 [ 15.023516] kasan_strings+0xc0/0xe80 [ 15.023716] kunit_try_run_case+0x1a5/0x480 [ 15.023926] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.024192] kthread+0x337/0x6f0 [ 15.024322] ret_from_fork+0x116/0x1d0 [ 15.024454] ret_from_fork_asm+0x1a/0x30 [ 15.024593] [ 15.024679] Freed by task 276: [ 15.024836] kasan_save_stack+0x45/0x70 [ 15.025026] kasan_save_track+0x18/0x40 [ 15.025302] kasan_save_free_info+0x3f/0x60 [ 15.025449] __kasan_slab_free+0x56/0x70 [ 15.025589] kfree+0x222/0x3f0 [ 15.025705] kasan_strings+0x2aa/0xe80 [ 15.026118] kunit_try_run_case+0x1a5/0x480 [ 15.026353] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.026732] kthread+0x337/0x6f0 [ 15.026902] ret_from_fork+0x116/0x1d0 [ 15.027175] ret_from_fork_asm+0x1a/0x30 [ 15.027389] [ 15.027485] The buggy address belongs to the object at ffff888102b12e40 [ 15.027485] which belongs to the cache kmalloc-32 of size 32 [ 15.027962] The buggy address is located 16 bytes inside of [ 15.027962] freed 32-byte region [ffff888102b12e40, ffff888102b12e60) [ 15.028447] [ 15.028528] The buggy address belongs to the physical page: [ 15.028784] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b12 [ 15.029159] flags: 0x200000000000000(node=0|zone=2) [ 15.029573] page_type: f5(slab) [ 15.029761] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 15.030197] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 15.030436] page dumped because: kasan: bad access detected [ 15.030609] [ 15.030699] Memory state around the buggy address: [ 15.030974] ffff888102b12d00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.031565] ffff888102b12d80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.031801] >ffff888102b12e00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.032014] ^ [ 15.032603] ffff888102b12e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.033358] ffff888102b12f00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.033990] ==================================================================