Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.115820] ==================================================================
[   15.115939] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   15.118247] Read of size 1 at addr fff00000c591d53f by task kunit_try_catch/139
[   15.118298] 
[   15.118336] CPU: 1 UID: 0 PID: 139 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.118416] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.118441] Hardware name: linux,dummy-virt (DT)
[   15.118472] Call trace:
[   15.118494]  show_stack+0x20/0x38 (C)
[   15.118543]  dump_stack_lvl+0x8c/0xd0
[   15.118590]  print_report+0x118/0x5d0
[   15.118637]  kasan_report+0xdc/0x128
[   15.118681]  __asan_report_load1_noabort+0x20/0x30
[   15.118731]  kmalloc_oob_left+0x2ec/0x320
[   15.118776]  kunit_try_run_case+0x170/0x3f0
[   15.118824]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.118876]  kthread+0x328/0x630
[   15.118917]  ret_from_fork+0x10/0x20
[   15.118964] 
[   15.118981] Allocated by task 26:
[   15.119011]  kasan_save_stack+0x3c/0x68
[   15.119049]  kasan_save_track+0x20/0x40
[   15.119086]  kasan_save_alloc_info+0x40/0x58
[   15.119124]  __kasan_kmalloc+0xd4/0xd8
[   15.119159]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   15.119212]  kstrdup+0x54/0xc8
[   15.119243]  devtmpfs_work_loop+0x6f8/0xa58
[   15.119283]  devtmpfsd+0x50/0x58
[   15.119316]  kthread+0x328/0x630
[   15.119346]  ret_from_fork+0x10/0x20
[   15.119380] 
[   15.119411] Freed by task 26:
[   15.119445]  kasan_save_stack+0x3c/0x68
[   15.119481]  kasan_save_track+0x20/0x40
[   15.119516]  kasan_save_free_info+0x4c/0x78
[   15.119553]  __kasan_slab_free+0x6c/0x98
[   15.119588]  kfree+0x214/0x3c8
[   15.119620]  devtmpfs_work_loop+0x804/0xa58
[   15.119654]  devtmpfsd+0x50/0x58
[   15.119685]  kthread+0x328/0x630
[   15.119715]  ret_from_fork+0x10/0x20
[   15.119755] 
[   15.119776] The buggy address belongs to the object at fff00000c591d520
[   15.119776]  which belongs to the cache kmalloc-16 of size 16
[   15.119832] The buggy address is located 15 bytes to the right of
[   15.119832]  allocated 16-byte region [fff00000c591d520, fff00000c591d530)
[   15.119895] 
[   15.119914] The buggy address belongs to the physical page:
[   15.119945] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10591d
[   15.119998] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.120047] page_type: f5(slab)
[   15.120085] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.120134] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.120173] page dumped because: kasan: bad access detected
[   15.121277] 
[   15.121301] Memory state around the buggy address:
[   15.121517]  fff00000c591d400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.121567]  fff00000c591d480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.121610] >fff00000c591d500: fa fb fc fc fa fb fc fc 00 07 fc fc fc fc fc fc
[   15.121647]                                         ^
[   15.122031]  fff00000c591d580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.122697]  fff00000c591d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.122749] ==================================================================

[   11.934864] ==================================================================
[   11.935967] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   11.936203] Read of size 1 at addr ffff88810251487f by task kunit_try_catch/155
[   11.936432] 
[   11.936526] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.936572] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.936583] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.936604] Call Trace:
[   11.936616]  <TASK>
[   11.936633]  dump_stack_lvl+0x73/0xb0
[   11.936663]  print_report+0xd1/0x610
[   11.936684]  ? __virt_addr_valid+0x1db/0x2d0
[   11.936709]  ? kmalloc_oob_left+0x361/0x3c0
[   11.936729]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.936752]  ? kmalloc_oob_left+0x361/0x3c0
[   11.936809]  kasan_report+0x141/0x180
[   11.936837]  ? kmalloc_oob_left+0x361/0x3c0
[   11.936863]  __asan_report_load1_noabort+0x18/0x20
[   11.936888]  kmalloc_oob_left+0x361/0x3c0
[   11.936909]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   11.936932]  ? __schedule+0x10cc/0x2b60
[   11.936978]  ? __pfx_read_tsc+0x10/0x10
[   11.937013]  ? ktime_get_ts64+0x86/0x230
[   11.937052]  kunit_try_run_case+0x1a5/0x480
[   11.937104]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.937127]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.937151]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.937175]  ? __kthread_parkme+0x82/0x180
[   11.937197]  ? preempt_count_sub+0x50/0x80
[   11.937221]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.937245]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.937269]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.937294]  kthread+0x337/0x6f0
[   11.937313]  ? trace_preempt_on+0x20/0xc0
[   11.937338]  ? __pfx_kthread+0x10/0x10
[   11.937358]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.937380]  ? calculate_sigpending+0x7b/0xa0
[   11.937404]  ? __pfx_kthread+0x10/0x10
[   11.937436]  ret_from_fork+0x116/0x1d0
[   11.937464]  ? __pfx_kthread+0x10/0x10
[   11.937716]  ret_from_fork_asm+0x1a/0x30
[   11.937748]  </TASK>
[   11.937768] 
[   11.952538] Allocated by task 1:
[   11.953077]  kasan_save_stack+0x45/0x70
[   11.953255]  kasan_save_track+0x18/0x40
[   11.953415]  kasan_save_alloc_info+0x3b/0x50
[   11.953587]  __kasan_kmalloc+0xb7/0xc0
[   11.953721]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   11.953913]  kvasprintf+0xc5/0x150
[   11.954037]  __kthread_create_on_node+0x18b/0x3a0
[   11.954193]  kthread_create_on_node+0xab/0xe0
[   11.954340]  create_worker+0x3e5/0x7b0
[   11.954553]  alloc_unbound_pwq+0x8ea/0xdb0
[   11.954956]  apply_wqattrs_prepare+0x332/0xd20
[   11.955349]  apply_workqueue_attrs_locked+0x4d/0xa0
[   11.955884]  alloc_workqueue+0xcc7/0x1ad0
[   11.956371]  latency_fsnotify_init+0x1b/0x50
[   11.956809]  do_one_initcall+0xd8/0x370
[   11.957039]  kernel_init_freeable+0x420/0x6f0
[   11.957194]  kernel_init+0x23/0x1e0
[   11.957320]  ret_from_fork+0x116/0x1d0
[   11.957928]  ret_from_fork_asm+0x1a/0x30
[   11.958068] 
[   11.958138] The buggy address belongs to the object at ffff888102514860
[   11.958138]  which belongs to the cache kmalloc-16 of size 16
[   11.958892] The buggy address is located 18 bytes to the right of
[   11.958892]  allocated 13-byte region [ffff888102514860, ffff88810251486d)
[   11.960176] 
[   11.960338] The buggy address belongs to the physical page:
[   11.960904] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102514
[   11.961790] flags: 0x200000000000000(node=0|zone=2)
[   11.962245] page_type: f5(slab)
[   11.962648] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.962955] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.963182] page dumped because: kasan: bad access detected
[   11.963407] 
[   11.963543] Memory state around the buggy address:
[   11.963719]  ffff888102514700: 00 05 fc fc 00 05 fc fc 00 02 fc fc 00 03 fc fc
[   11.964034]  ffff888102514780: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   11.964306] >ffff888102514800: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 05 fc fc
[   11.964631]                                                                 ^
[   11.964933]  ffff888102514880: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.965394]  ffff888102514900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.965727] ==================================================================