Date
April 22, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 | |
rk3399-rock-pi-4b |
[ 20.343495] ================================================================== [ 20.343627] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 20.343738] Read of size 1 at addr fff00000c42a8690 by task kunit_try_catch/261 [ 20.343859] [ 20.343939] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc3 #1 PREEMPT [ 20.344111] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.344179] Hardware name: linux,dummy-virt (DT) [ 20.344599] Call trace: [ 20.344670] show_stack+0x20/0x38 (C) [ 20.344901] dump_stack_lvl+0x8c/0xd0 [ 20.345104] print_report+0x118/0x608 [ 20.345219] kasan_report+0xdc/0x128 [ 20.345362] __asan_report_load1_noabort+0x20/0x30 [ 20.345500] strnlen+0x80/0x88 [ 20.345665] kasan_strings+0x478/0xb00 [ 20.345761] kunit_try_run_case+0x170/0x3f0 [ 20.345845] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.346100] kthread+0x328/0x630 [ 20.346203] ret_from_fork+0x10/0x20 [ 20.346495] [ 20.346997] __kmalloc_cache_noprof+0x15c/0x3c0 [ 20.350183] The buggy address is located 16 bytes inside of [ 20.350183] freed 32-byte region [fff00000c42a8680, fff00000c42a86a0) [ 20.351848] [ 20.353091] fff00000c42a8780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.381840] Write of size 8 at addr fff00000c40d2888 by task kunit_try_catch/263 [ 20.384304] __kmalloc_cache_noprof+0x15c/0x3c0 [ 20.385282] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1040d2 [ 20.387589] BUG: KASAN: slab-out-of-bounds in kasan_bitops_modify.constprop.0+0xa44/0xbc0 [ 20.388551] print_report+0x118/0x608 [ 20.391784] kunit_try_run_case+0x170/0x3f0 [ 20.392470] [ 20.393703] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 20.394036] page dumped because: kasan: bad access detected [ 20.397349] CPU: 0 UID: 0 PID: 263 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc3 #1 PREEMPT [ 20.400863] kunit_try_run_case+0x170/0x3f0 [ 20.403105] page dumped because: kasan: bad access detected [ 20.403261] [ 20.403423] fff00000c40d2780: fa fb fc fc 00 02 fc fc fa fb fc fc fa fb fc fc [ 20.403873] fff00000c40d2980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.405605] [ 20.405866] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.406601] dump_stack_lvl+0x8c/0xd0 [ 20.407654] kasan_bitops_modify.constprop.0+0xa80/0xbc0 [ 20.408951] kunit_try_run_case+0x170/0x3f0 [ 20.409306] [ 20.413627] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 20.413866] page dumped because: kasan: bad access detected [ 20.413937] [ 20.414149] fff00000c40d2800: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 20.414571] ==================================================================
[ 21.270834] ================================================================== [ 21.271432] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 21.272332] Read of size 1 at addr ffff888103c72750 by task kunit_try_catch/279 [ 21.273003] [ 21.273263] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc3 #1 PREEMPT(voluntary) [ 21.273401] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.273444] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 21.273520] Call Trace: [ 21.273588] <TASK> [ 21.273619] dump_stack_lvl+0x73/0xb0 [ 21.273660] print_report+0xd1/0x650 [ 21.273700] ? __virt_addr_valid+0x1db/0x2d0 [ 21.273773] ? strnlen+0x73/0x80 [ 21.273803] ? kasan_complete_mode_report_info+0x64/0x200 [ 21.273838] ? strnlen+0x73/0x80 [ 21.273866] kasan_report+0x141/0x180 [ 21.273902] ? strnlen+0x73/0x80 [ 21.273936] __asan_report_load1_noabort+0x18/0x20 [ 21.273967] strnlen+0x73/0x80 [ 21.273998] kasan_strings+0x615/0xe80 [ 21.274030] ? trace_hardirqs_on+0x37/0xe0 [ 21.274065] ? __pfx_kasan_strings+0x10/0x10 [ 21.274096] ? finish_task_switch.isra.0+0x153/0x700 [ 21.274132] ? __switch_to+0x5d9/0xf60 [ 21.274162] ? dequeue_task_fair+0x156/0x4e0 [ 21.274196] ? __schedule+0x10cc/0x2b30 [ 21.274232] ? __pfx_read_tsc+0x10/0x10 [ 21.274262] ? ktime_get_ts64+0x86/0x230 [ 21.274300] kunit_try_run_case+0x1a5/0x480 [ 21.274337] ? __pfx_kunit_try_run_case+0x10/0x10 [ 21.274371] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 21.274407] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 21.274553] ? __kthread_parkme+0x82/0x180 [ 21.274638] ? preempt_count_sub+0x50/0x80 [ 21.274718] ? __pfx_kunit_try_run_case+0x10/0x10 [ 21.274796] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.274867] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 21.274942] kthread+0x337/0x6f0 [ 21.275011] ? trace_preempt_on+0x20/0xc0 [ 21.275064] ? __pfx_kthread+0x10/0x10 [ 21.275098] ? _raw_spin_unlock_irq+0x47/0x80 [ 21.275136] ? calculate_sigpending+0x7b/0xa0 [ 21.275168] ? __pfx_kthread+0x10/0x10 [ 21.275203] ret_from_fork+0x41/0x80 [ 21.275234] ? __pfx_kthread+0x10/0x10 [ 21.275268] ret_from_fork_asm+0x1a/0x30 [ 21.275312] </TASK> [ 21.275327] [ 21.294784] Allocated by task 279: [ 21.295236] kasan_save_stack+0x45/0x70 [ 21.295653] kasan_save_track+0x18/0x40 [ 21.296082] kasan_save_alloc_info+0x3b/0x50 [ 21.296451] __kasan_kmalloc+0xb7/0xc0 [ 21.296899] __kmalloc_cache_noprof+0x189/0x420 [ 21.297287] kasan_strings+0xc0/0xe80 [ 21.297735] kunit_try_run_case+0x1a5/0x480 [ 21.298124] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.298814] kthread+0x337/0x6f0 [ 21.299160] ret_from_fork+0x41/0x80 [ 21.299535] ret_from_fork_asm+0x1a/0x30 [ 21.300177] [ 21.300434] Freed by task 279: [ 21.300794] kasan_save_stack+0x45/0x70 [ 21.301484] kasan_save_track+0x18/0x40 [ 21.301882] kasan_save_free_info+0x3f/0x60 [ 21.303362] __kasan_slab_free+0x56/0x70 [ 21.303748] kfree+0x222/0x3f0 [ 21.304118] kasan_strings+0x2aa/0xe80 [ 21.304532] kunit_try_run_case+0x1a5/0x480 [ 21.304904] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.305385] kthread+0x337/0x6f0 [ 21.305802] ret_from_fork+0x41/0x80 [ 21.306177] ret_from_fork_asm+0x1a/0x30 [ 21.306665] [ 21.306897] The buggy address belongs to the object at ffff888103c72740 [ 21.306897] which belongs to the cache kmalloc-32 of size 32 [ 21.307741] The buggy address is located 16 bytes inside of [ 21.307741] freed 32-byte region [ffff888103c72740, ffff888103c72760) [ 21.308677] [ 21.308869] The buggy address belongs to the physical page: [ 21.309361] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103c72 [ 21.310100] flags: 0x200000000000000(node=0|zone=2) [ 21.310680] page_type: f5(slab) [ 21.311000] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 21.311726] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.312216] page dumped because: kasan: bad access detected [ 21.312698] [ 21.312985] Memory state around the buggy address: [ 21.313526] ffff888103c72600: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc [ 21.314000] ffff888103c72680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.314514] >ffff888103c72700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 21.315291] ^ [ 21.316032] ffff888103c72780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.316601] ffff888103c72800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 21.317154] ==================================================================
[ 21.899707] ================================================================== [ 21.900362] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 21.900917] Read of size 1 at addr ffff000010ac0b10 by task kunit_try_catch/317 [ 21.901579] [ 21.901729] CPU: 4 UID: 0 PID: 317 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc3 #1 PREEMPT [ 21.901762] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.901772] Hardware name: Radxa ROCK Pi 4B (DT) [ 21.901783] Call trace: [ 21.901791] show_stack+0x20/0x38 (C) [ 21.901812] dump_stack_lvl+0x8c/0xd0 [ 21.901830] print_report+0x118/0x608 [ 21.901850] kasan_report+0xdc/0x128 [ 21.901868] __asan_report_load1_noabort+0x20/0x30 [ 21.901891] strnlen+0x80/0x88 [ 21.901912] kasan_strings+0x478/0xb00 [ 21.901934] kunit_try_run_case+0x170/0x3f0 [ 21.901956] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.901983] kthread+0x328/0x630 [ 21.902004] ret_from_fork+0x10/0x20 [ 21.902025] [ 21.907782] Allocated by task 317: [ 21.908098] kasan_save_stack+0x3c/0x68 [ 21.908458] kasan_save_track+0x20/0x40 [ 21.908817] kasan_save_alloc_info+0x40/0x58 [ 21.909215] __kasan_kmalloc+0xd4/0xd8 [ 21.909565] __kmalloc_cache_noprof+0x15c/0x3c0 [ 21.909992] kasan_strings+0xc8/0xb00 [ 21.910339] kunit_try_run_case+0x170/0x3f0 [ 21.910732] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.911241] kthread+0x328/0x630 [ 21.911549] ret_from_fork+0x10/0x20 [ 21.911888] [ 21.912033] Freed by task 317: [ 21.912318] kasan_save_stack+0x3c/0x68 [ 21.912677] kasan_save_track+0x20/0x40 [ 21.913035] kasan_save_free_info+0x4c/0x78 [ 21.913425] __kasan_slab_free+0x6c/0x98 [ 21.913791] kfree+0x214/0x3c8 [ 21.914086] kasan_strings+0x24c/0xb00 [ 21.914441] kunit_try_run_case+0x170/0x3f0 [ 21.914834] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.915342] kthread+0x328/0x630 [ 21.915652] ret_from_fork+0x10/0x20 [ 21.915990] [ 21.916135] The buggy address belongs to the object at ffff000010ac0b00 [ 21.916135] which belongs to the cache kmalloc-32 of size 32 [ 21.917237] The buggy address is located 16 bytes inside of [ 21.917237] freed 32-byte region [ffff000010ac0b00, ffff000010ac0b20) [ 21.918317] [ 21.918464] The buggy address belongs to the physical page: [ 21.918967] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ac0 [ 21.919683] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff) [ 21.920278] page_type: f5(slab) [ 21.920576] raw: 03fffe0000000000 ffff000000402780 dead000000000122 0000000000000000 [ 21.921278] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.921972] page dumped because: kasan: bad access detected [ 21.922477] [ 21.922622] Memory state around the buggy address: [ 21.923059] ffff000010ac0a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.923712] ffff000010ac0a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.924365] >ffff000010ac0b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.925014] ^ [ 21.925361] ffff000010ac0b80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.926012] ffff000010ac0c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.926662] ==================================================================