Hay
Date
May 15, 2025, 10:38 a.m.

Environment
qemu-x86_64

[   16.243421] ==================================================================
[   16.243903] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   16.244258] Read of size 1 at addr ffff888102b6e290 by task kunit_try_catch/277
[   16.244855] 
[   16.245070] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250515 #1 PREEMPT(voluntary) 
[   16.245178] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.245218] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.245270] Call Trace:
[   16.245296]  <TASK>
[   16.245333]  dump_stack_lvl+0x73/0xb0
[   16.245389]  print_report+0xd1/0x650
[   16.245443]  ? __virt_addr_valid+0x1db/0x2d0
[   16.245499]  ? kasan_strings+0xcbc/0xe80
[   16.245541]  ? kasan_complete_mode_report_info+0x64/0x200
[   16.245579]  ? kasan_strings+0xcbc/0xe80
[   16.245604]  kasan_report+0x141/0x180
[   16.245626]  ? kasan_strings+0xcbc/0xe80
[   16.245652]  __asan_report_load1_noabort+0x18/0x20
[   16.245673]  kasan_strings+0xcbc/0xe80
[   16.245694]  ? trace_hardirqs_on+0x37/0xe0
[   16.245725]  ? __pfx_kasan_strings+0x10/0x10
[   16.245756]  ? finish_task_switch.isra.0+0x153/0x700
[   16.245793]  ? __switch_to+0x47/0xf50
[   16.245841]  ? __schedule+0x10cc/0x2b60
[   16.246009]  ? __pfx_read_tsc+0x10/0x10
[   16.246062]  ? ktime_get_ts64+0x86/0x230
[   16.246109]  kunit_try_run_case+0x1a5/0x480
[   16.246156]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.246192]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.246256]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.246299]  ? __kthread_parkme+0x82/0x180
[   16.246347]  ? preempt_count_sub+0x50/0x80
[   16.246378]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.246403]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.246427]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.246451]  kthread+0x337/0x6f0
[   16.246481]  ? trace_preempt_on+0x20/0xc0
[   16.246557]  ? __pfx_kthread+0x10/0x10
[   16.246594]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.246618]  ? calculate_sigpending+0x7b/0xa0
[   16.246644]  ? __pfx_kthread+0x10/0x10
[   16.246665]  ret_from_fork+0x116/0x1d0
[   16.246686]  ? __pfx_kthread+0x10/0x10
[   16.246706]  ret_from_fork_asm+0x1a/0x30
[   16.246740]  </TASK>
[   16.246752] 
[   16.260213] Allocated by task 277:
[   16.260497]  kasan_save_stack+0x45/0x70
[   16.261126]  kasan_save_track+0x18/0x40
[   16.261475]  kasan_save_alloc_info+0x3b/0x50
[   16.261843]  __kasan_kmalloc+0xb7/0xc0
[   16.262375]  __kmalloc_cache_noprof+0x189/0x420
[   16.262672]  kasan_strings+0xc0/0xe80
[   16.263120]  kunit_try_run_case+0x1a5/0x480
[   16.263351]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.263714]  kthread+0x337/0x6f0
[   16.264060]  ret_from_fork+0x116/0x1d0
[   16.264289]  ret_from_fork_asm+0x1a/0x30
[   16.264583] 
[   16.264711] Freed by task 277:
[   16.264854]  kasan_save_stack+0x45/0x70
[   16.265140]  kasan_save_track+0x18/0x40
[   16.266188]  kasan_save_free_info+0x3f/0x60
[   16.266401]  __kasan_slab_free+0x56/0x70
[   16.266717]  kfree+0x222/0x3f0
[   16.266945]  kasan_strings+0x2aa/0xe80
[   16.267174]  kunit_try_run_case+0x1a5/0x480
[   16.267388]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.267653]  kthread+0x337/0x6f0
[   16.267903]  ret_from_fork+0x116/0x1d0
[   16.268136]  ret_from_fork_asm+0x1a/0x30
[   16.268383] 
[   16.268491] The buggy address belongs to the object at ffff888102b6e280
[   16.268491]  which belongs to the cache kmalloc-32 of size 32
[   16.268860] The buggy address is located 16 bytes inside of
[   16.268860]  freed 32-byte region [ffff888102b6e280, ffff888102b6e2a0)
[   16.269725] 
[   16.269916] The buggy address belongs to the physical page:
[   16.270318] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b6e
[   16.271688] flags: 0x200000000000000(node=0|zone=2)
[   16.272061] page_type: f5(slab)
[   16.272267] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   16.272946] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   16.273263] page dumped because: kasan: bad access detected
[   16.273572] 
[   16.273678] Memory state around the buggy address:
[   16.274021]  ffff888102b6e180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.274313]  ffff888102b6e200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.274772] >ffff888102b6e280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.275071]                          ^
[   16.275545]  ffff888102b6e300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   16.275839]  ffff888102b6e380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.276066] ==================================================================