Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.587858] ==================================================================
[   21.588878] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   21.589512] Read of size 1 at addr fff00000c596b6ff by task kunit_try_catch/127
[   21.590119] 
[   21.590402] CPU: 0 UID: 0 PID: 127 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   21.590581] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.590644] Hardware name: linux,dummy-virt (DT)
[   21.590717] Call trace:
[   21.590766]  show_stack+0x20/0x38 (C)
[   21.591038]  dump_stack_lvl+0x8c/0xd0
[   21.593124]  print_report+0x118/0x608
[   21.593251]  kasan_report+0xdc/0x128
[   21.593414]  __asan_report_load1_noabort+0x20/0x30
[   21.593532]  kmalloc_oob_left+0x2ec/0x320
[   21.593647]  kunit_try_run_case+0x170/0x3f0
[   21.593771]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.593913]  kthread+0x318/0x620
[   21.594029]  ret_from_fork+0x10/0x20
[   21.594150] 
[   21.605615] Allocated by task 10:
[   21.606038]  kasan_save_stack+0x3c/0x68
[   21.606768]  kasan_save_track+0x20/0x40
[   21.607759]  kasan_save_alloc_info+0x40/0x58
[   21.609285]  __kasan_kmalloc+0xd4/0xd8
[   21.609868]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   21.610614]  kvasprintf+0xe0/0x180
[   21.611216]  __kthread_create_on_node+0x16c/0x350
[   21.611753]  kthread_create_on_node+0xe4/0x130
[   21.612293]  create_worker+0x380/0x6b8
[   21.612912]  worker_thread+0x71c/0xf18
[   21.613362]  kthread+0x318/0x620
[   21.613872]  ret_from_fork+0x10/0x20
[   21.614426] 
[   21.614794] The buggy address belongs to the object at fff00000c596b6e0
[   21.614794]  which belongs to the cache kmalloc-16 of size 16
[   21.617367] The buggy address is located 19 bytes to the right of
[   21.617367]  allocated 12-byte region [fff00000c596b6e0, fff00000c596b6ec)
[   21.618522] 
[   21.618806] The buggy address belongs to the physical page:
[   21.619439] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10596b
[   21.620372] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.621063] page_type: f5(slab)
[   21.621996] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   21.622822] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   21.623748] page dumped because: kasan: bad access detected
[   21.624357] 
[   21.624669] Memory state around the buggy address:
[   21.625756]  fff00000c596b580: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 05 fc fc
[   21.626571]  fff00000c596b600: fa fb fc fc 00 02 fc fc fa fb fc fc fa fb fc fc
[   21.627319] >fff00000c596b680: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc
[   21.628076]                                                                 ^
[   21.628865]  fff00000c596b700: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.629658]  fff00000c596b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.630682] ==================================================================

[   16.460027] ==================================================================
[   16.460744] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x363/0x3c0
[   16.462431] Read of size 1 at addr ffff8881024b00df by task kunit_try_catch/146
[   16.463846] 
[   16.464123] CPU: 0 UID: 0 PID: 146 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   16.464193] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.464216] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.464261] Call Trace:
[   16.464301]  <TASK>
[   16.464344]  dump_stack_lvl+0x73/0xb0
[   16.464496]  print_report+0xd1/0x650
[   16.464554]  ? __virt_addr_valid+0x1db/0x2d0
[   16.464612]  ? kmalloc_oob_left+0x363/0x3c0
[   16.464647]  ? kasan_complete_mode_report_info+0x64/0x200
[   16.464691]  ? kmalloc_oob_left+0x363/0x3c0
[   16.464730]  kasan_report+0x140/0x180
[   16.464769]  ? kmalloc_oob_left+0x363/0x3c0
[   16.464812]  __asan_report_load1_noabort+0x18/0x20
[   16.464855]  kmalloc_oob_left+0x363/0x3c0
[   16.464911]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   16.464950]  ? __schedule+0xce8/0x2840
[   16.464997]  ? __pfx_read_tsc+0x10/0x10
[   16.465038]  ? ktime_get_ts64+0x86/0x230
[   16.465086]  kunit_try_run_case+0x1a6/0x480
[   16.465136]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.465179]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   16.465238]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.465297]  ? __kthread_parkme+0x82/0x160
[   16.465368]  ? preempt_count_sub+0x50/0x80
[   16.465417]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.465466]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.465521]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.465568]  kthread+0x324/0x6e0
[   16.465598]  ? trace_preempt_on+0x20/0xc0
[   16.465631]  ? __pfx_kthread+0x10/0x10
[   16.465659]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.465687]  ? calculate_sigpending+0x7b/0xa0
[   16.465715]  ? __pfx_kthread+0x10/0x10
[   16.465743]  ret_from_fork+0x41/0x80
[   16.465767]  ? __pfx_kthread+0x10/0x10
[   16.465795]  ret_from_fork_asm+0x1a/0x30
[   16.465836]  </TASK>
[   16.465852] 
[   16.481479] Allocated by task 1:
[   16.481860]  kasan_save_stack+0x45/0x70
[   16.482239]  kasan_save_track+0x18/0x40
[   16.483621]  kasan_save_alloc_info+0x3b/0x50
[   16.484089]  __kasan_kmalloc+0xb7/0xc0
[   16.484639]  __kmalloc_noprof+0x1ca/0x500
[   16.485063]  kobject_get_path+0xa7/0x1f0
[   16.485640]  kobject_uevent_env+0x1f9/0xff0
[   16.486081]  kobject_uevent+0xf/0x20
[   16.486854]  param_sysfs_builtin_init+0x28c/0x3a0
[   16.487532]  do_one_initcall+0xd9/0x370
[   16.487855]  kernel_init_freeable+0x425/0x6f0
[   16.488186]  kernel_init+0x23/0x1e0
[   16.488546]  ret_from_fork+0x41/0x80
[   16.489067]  ret_from_fork_asm+0x1a/0x30
[   16.489640] 
[   16.489928] Freed by task 1:
[   16.490235]  kasan_save_stack+0x45/0x70
[   16.491264]  kasan_save_track+0x18/0x40
[   16.491845]  kasan_save_free_info+0x3f/0x60
[   16.492227]  __kasan_slab_free+0x56/0x70
[   16.492671]  kfree+0x224/0x3f0
[   16.493034]  kobject_uevent_env+0x233/0xff0
[   16.493483]  kobject_uevent+0xf/0x20
[   16.493845]  param_sysfs_builtin_init+0x28c/0x3a0
[   16.494183]  do_one_initcall+0xd9/0x370
[   16.494468]  kernel_init_freeable+0x425/0x6f0
[   16.494791]  kernel_init+0x23/0x1e0
[   16.495093]  ret_from_fork+0x41/0x80
[   16.495387]  ret_from_fork_asm+0x1a/0x30
[   16.495742] 
[   16.496917] The buggy address belongs to the object at ffff8881024b00c0
[   16.496917]  which belongs to the cache kmalloc-16 of size 16
[   16.497728] The buggy address is located 15 bytes to the right of
[   16.497728]  allocated 16-byte region [ffff8881024b00c0, ffff8881024b00d0)
[   16.498737] 
[   16.498959] The buggy address belongs to the physical page:
[   16.499286] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024b0
[   16.500730] flags: 0x200000000000000(node=0|zone=2)
[   16.501201] page_type: f5(slab)
[   16.501527] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   16.502105] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   16.502762] page dumped because: kasan: bad access detected
[   16.503601] 
[   16.503753] Memory state around the buggy address:
[   16.504026]  ffff8881024aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.504526]  ffff8881024b0000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   16.505899] >ffff8881024b0080: fa fb fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   16.506427]                                                     ^
[   16.506933]  ffff8881024b0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.507357]  ffff8881024b0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.508107] ==================================================================