Date
June 20, 2025, 12:38 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 35.179829] ================================================================== [ 35.180131] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 35.180629] Read of size 1 at addr fff00000c7699cd0 by task kunit_try_catch/270 [ 35.180907] [ 35.181020] CPU: 0 UID: 0 PID: 270 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT [ 35.181218] Tainted: [B]=BAD_PAGE, [N]=TEST [ 35.181274] Hardware name: linux,dummy-virt (DT) [ 35.181342] Call trace: [ 35.181852] show_stack+0x20/0x38 (C) [ 35.182024] dump_stack_lvl+0x8c/0xd0 [ 35.182196] print_report+0x118/0x608 [ 35.182322] kasan_report+0xdc/0x128 [ 35.182442] __asan_report_load1_noabort+0x20/0x30 [ 35.182564] strnlen+0x80/0x88 [ 35.182683] kasan_strings+0x478/0xb00 [ 35.182825] kunit_try_run_case+0x170/0x3f0 [ 35.183160] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.183349] kthread+0x328/0x630 [ 35.183484] ret_from_fork+0x10/0x20 [ 35.183803] [ 35.183844] Allocated by task 270: [ 35.183899] kasan_save_stack+0x3c/0x68 [ 35.183970] kasan_save_track+0x20/0x40 [ 35.184041] kasan_save_alloc_info+0x40/0x58 [ 35.184092] __kasan_kmalloc+0xd4/0xd8 [ 35.184137] __kmalloc_cache_noprof+0x16c/0x3c0 [ 35.184185] kasan_strings+0xc8/0xb00 [ 35.184229] kunit_try_run_case+0x170/0x3f0 [ 35.184274] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.184362] kthread+0x328/0x630 [ 35.184405] ret_from_fork+0x10/0x20 [ 35.184450] [ 35.184476] Freed by task 270: [ 35.184511] kasan_save_stack+0x3c/0x68 [ 35.184556] kasan_save_track+0x20/0x40 [ 35.184602] kasan_save_free_info+0x4c/0x78 [ 35.184673] __kasan_slab_free+0x6c/0x98 [ 35.184718] kfree+0x214/0x3c8 [ 35.184757] kasan_strings+0x24c/0xb00 [ 35.184801] kunit_try_run_case+0x170/0x3f0 [ 35.184846] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.184896] kthread+0x328/0x630 [ 35.184935] ret_from_fork+0x10/0x20 [ 35.184978] [ 35.185004] The buggy address belongs to the object at fff00000c7699cc0 [ 35.185004] which belongs to the cache kmalloc-32 of size 32 [ 35.185076] The buggy address is located 16 bytes inside of [ 35.185076] freed 32-byte region [fff00000c7699cc0, fff00000c7699ce0) [ 35.185150] [ 35.185179] The buggy address belongs to the physical page: [ 35.185222] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107699 [ 35.185290] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 35.185356] page_type: f5(slab) [ 35.185412] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 35.185475] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 35.214047] __kmalloc_cache_noprof+0x16c/0x3c0 [ 35.217877] >fff00000c3f4e880: 00 04 fc fc fa fb fc fc 00 01 fc fc fc fc fc fc [ 35.223043] Hardware name: linux,dummy-virt (DT) [ 35.223709] kunit_try_run_case+0x170/0x3f0 [ 35.223834] kthread+0x328/0x630 [ 35.224298] kunit_try_run_case+0x170/0x3f0 [ 35.226717] [ 35.229146] Memory state around the buggy address: [ 35.232316] BUG: KASAN: slab-out-of-bounds in kasan_bitops_modify.constprop.0+0x1dc/0xbc0 [ 35.235146] [ 35.236071] kunit_try_run_case+0x170/0x3f0 [ 35.237349] [ 35.237764] page_type: f5(slab) [ 35.239021] fff00000c3f4e980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.241564] Tainted: [B]=BAD_PAGE, [N]=TEST [ 35.242938] kthread+0x328/0x630 [ 35.243663] __kasan_kmalloc+0xd4/0xd8 [ 35.245742] page dumped because: kasan: bad access detected [ 35.248781] [ 35.249216] Tainted: [B]=BAD_PAGE, [N]=TEST [ 35.250466] kasan_bitops_generic+0x110/0x1c8 [ 35.251926] kunit_try_run_case+0x170/0x3f0 [ 35.252932] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f4e [ 35.257529] Write of size 8 at addr fff00000c3f4e8c8 by task kunit_try_catch/272 [ 35.259218] __kasan_check_write+0x20/0x30 [ 35.260406] kasan_save_track+0x20/0x40 [ 35.261149] kthread+0x328/0x630 [ 35.262114] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 35.266489] CPU: 0 UID: 0 PID: 272 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT [ 35.271829] kasan_save_track+0x20/0x40 [ 35.274083] The buggy address belongs to the object at fff00000c3f4e8c0 [ 35.274083] which belongs to the cache kmalloc-16 of size 16 [ 35.277759] ==================================================================
[ 27.935042] ================================================================== [ 27.935898] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 27.936838] Read of size 1 at addr ffff888102336390 by task kunit_try_catch/288 [ 27.937756] [ 27.937942] CPU: 0 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) [ 27.938060] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.938090] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.938137] Call Trace: [ 27.938165] <TASK> [ 27.938201] dump_stack_lvl+0x73/0xb0 [ 27.938272] print_report+0xd1/0x650 [ 27.938326] ? __virt_addr_valid+0x1db/0x2d0 [ 27.938379] ? strnlen+0x73/0x80 [ 27.938407] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.938435] ? strnlen+0x73/0x80 [ 27.938481] kasan_report+0x141/0x180 [ 27.938506] ? strnlen+0x73/0x80 [ 27.938530] __asan_report_load1_noabort+0x18/0x20 [ 27.938556] strnlen+0x73/0x80 [ 27.938576] kasan_strings+0x615/0xe80 [ 27.938599] ? trace_hardirqs_on+0x37/0xe0 [ 27.938625] ? __pfx_kasan_strings+0x10/0x10 [ 27.938646] ? finish_task_switch.isra.0+0x153/0x700 [ 27.938673] ? __switch_to+0x47/0xf50 [ 27.938703] ? __schedule+0x10cc/0x2b60 [ 27.938728] ? __pfx_read_tsc+0x10/0x10 [ 27.938751] ? ktime_get_ts64+0x86/0x230 [ 27.938779] kunit_try_run_case+0x1a5/0x480 [ 27.938806] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.938830] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.938853] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.938878] ? __kthread_parkme+0x82/0x180 [ 27.938900] ? preempt_count_sub+0x50/0x80 [ 27.938923] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.938948] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.938972] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.938997] kthread+0x337/0x6f0 [ 27.939017] ? trace_preempt_on+0x20/0xc0 [ 27.939040] ? __pfx_kthread+0x10/0x10 [ 27.939061] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.939084] ? calculate_sigpending+0x7b/0xa0 [ 27.939108] ? __pfx_kthread+0x10/0x10 [ 27.939132] ret_from_fork+0x116/0x1d0 [ 27.939161] ? __pfx_kthread+0x10/0x10 [ 27.939191] ret_from_fork_asm+0x1a/0x30 [ 27.939224] </TASK> [ 27.939237] [ 27.947158] Allocated by task 288: [ 27.947494] kasan_save_stack+0x45/0x70 [ 27.947875] kasan_save_track+0x18/0x40 [ 27.948212] kasan_save_alloc_info+0x3b/0x50 [ 27.948585] __kasan_kmalloc+0xb7/0xc0 [ 27.948910] __kmalloc_cache_noprof+0x189/0x420 [ 27.949323] kasan_strings+0xc0/0xe80 [ 27.949647] kunit_try_run_case+0x1a5/0x480 [ 27.949993] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.950488] kthread+0x337/0x6f0 [ 27.950673] ret_from_fork+0x116/0x1d0 [ 27.950846] ret_from_fork_asm+0x1a/0x30 [ 27.951128] [ 27.951289] Freed by task 288: [ 27.951567] kasan_save_stack+0x45/0x70 [ 27.951864] kasan_save_track+0x18/0x40 [ 27.952040] kasan_save_free_info+0x3f/0x60 [ 27.952393] __kasan_slab_free+0x56/0x70 [ 27.952717] kfree+0x222/0x3f0 [ 27.952966] kasan_strings+0x2aa/0xe80 [ 27.953321] kunit_try_run_case+0x1a5/0x480 [ 27.953579] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.953802] kthread+0x337/0x6f0 [ 27.953963] ret_from_fork+0x116/0x1d0 [ 27.954145] ret_from_fork_asm+0x1a/0x30 [ 27.954328] [ 27.954432] The buggy address belongs to the object at ffff888102336380 [ 27.954432] which belongs to the cache kmalloc-32 of size 32 [ 27.955506] The buggy address is located 16 bytes inside of [ 27.955506] freed 32-byte region [ffff888102336380, ffff8881023363a0) [ 27.956409] [ 27.956554] The buggy address belongs to the physical page: [ 27.956772] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102336 [ 27.957074] flags: 0x200000000000000(node=0|zone=2) [ 27.957613] page_type: f5(slab) [ 27.957895] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.958566] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.958977] page dumped because: kasan: bad access detected [ 27.959264] [ 27.959362] Memory state around the buggy address: [ 27.959574] ffff888102336280: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc [ 27.959840] ffff888102336300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.960394] >ffff888102336380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.960904] ^ [ 27.961202] ffff888102336400: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.961650] ffff888102336480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.961910] ==================================================================