Hay
Date
July 17, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.028202] ==================================================================
[   15.028263] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   15.028317] Read of size 1 at addr fff00000c433eb9f by task kunit_try_catch/139
[   15.028537] 
[   15.028602] CPU: 0 UID: 0 PID: 139 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.028688] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.028714] Hardware name: linux,dummy-virt (DT)
[   15.028743] Call trace:
[   15.028764]  show_stack+0x20/0x38 (C)
[   15.029457]  dump_stack_lvl+0x8c/0xd0
[   15.029810]  print_report+0x118/0x5d0
[   15.029867]  kasan_report+0xdc/0x128
[   15.029912]  __asan_report_load1_noabort+0x20/0x30
[   15.030287]  kmalloc_oob_left+0x2ec/0x320
[   15.030384]  kunit_try_run_case+0x170/0x3f0
[   15.030697]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.030907]  kthread+0x328/0x630
[   15.031073]  ret_from_fork+0x10/0x20
[   15.031182] 
[   15.031199] Allocated by task 9:
[   15.031484]  kasan_save_stack+0x3c/0x68
[   15.031726]  kasan_save_track+0x20/0x40
[   15.031915]  kasan_save_alloc_info+0x40/0x58
[   15.031971]  __kasan_kmalloc+0xd4/0xd8
[   15.032017]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   15.032065]  kvasprintf+0xe0/0x180
[   15.032135]  __kthread_create_on_node+0x16c/0x350
[   15.032196]  kthread_create_on_node+0xe4/0x130
[   15.032233]  create_worker+0x380/0x6b8
[   15.032276]  worker_thread+0x808/0xf38
[   15.032309]  kthread+0x328/0x630
[   15.032355]  ret_from_fork+0x10/0x20
[   15.032390] 
[   15.032418] The buggy address belongs to the object at fff00000c433eb80
[   15.032418]  which belongs to the cache kmalloc-16 of size 16
[   15.032488] The buggy address is located 19 bytes to the right of
[   15.032488]  allocated 12-byte region [fff00000c433eb80, fff00000c433eb8c)
[   15.032561] 
[   15.032594] The buggy address belongs to the physical page:
[   15.032625] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10433e
[   15.032677] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.032735] page_type: f5(slab)
[   15.032787] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.033344] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.033599] page dumped because: kasan: bad access detected
[   15.033666] 
[   15.033712] Memory state around the buggy address:
[   15.033804]  fff00000c433ea80: fa fb fc fc 00 05 fc fc fa fb fc fc fa fb fc fc
[   15.033868]  fff00000c433eb00: 00 07 fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.033918] >fff00000c433eb80: 00 04 fc fc 00 07 fc fc fc fc fc fc fc fc fc fc
[   15.033956]                             ^
[   15.033998]  fff00000c433ec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.034039]  fff00000c433ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.034077] ==================================================================

[   12.364623] ==================================================================
[   12.365095] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   12.365644] Read of size 1 at addr ffff88810254a25f by task kunit_try_catch/155
[   12.366018] 
[   12.366196] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.366241] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.366252] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.366272] Call Trace:
[   12.366408]  <TASK>
[   12.366428]  dump_stack_lvl+0x73/0xb0
[   12.366456]  print_report+0xd1/0x610
[   12.366478]  ? __virt_addr_valid+0x1db/0x2d0
[   12.366500]  ? kmalloc_oob_left+0x361/0x3c0
[   12.366520]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.366543]  ? kmalloc_oob_left+0x361/0x3c0
[   12.366577]  kasan_report+0x141/0x180
[   12.366598]  ? kmalloc_oob_left+0x361/0x3c0
[   12.366624]  __asan_report_load1_noabort+0x18/0x20
[   12.366649]  kmalloc_oob_left+0x361/0x3c0
[   12.366670]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   12.366694]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   12.366720]  kunit_try_run_case+0x1a5/0x480
[   12.366744]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.366766]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.366790]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.366813]  ? __kthread_parkme+0x82/0x180
[   12.366832]  ? preempt_count_sub+0x50/0x80
[   12.366856]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.366880]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.366904]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.366929]  kthread+0x337/0x6f0
[   12.366948]  ? trace_preempt_on+0x20/0xc0
[   12.366970]  ? __pfx_kthread+0x10/0x10
[   12.366991]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.367012]  ? calculate_sigpending+0x7b/0xa0
[   12.367035]  ? __pfx_kthread+0x10/0x10
[   12.367056]  ret_from_fork+0x116/0x1d0
[   12.367074]  ? __pfx_kthread+0x10/0x10
[   12.367094]  ret_from_fork_asm+0x1a/0x30
[   12.367124]  </TASK>
[   12.367134] 
[   12.375525] Allocated by task 1:
[   12.375722]  kasan_save_stack+0x45/0x70
[   12.376109]  kasan_save_track+0x18/0x40
[   12.376394]  kasan_save_alloc_info+0x3b/0x50
[   12.376590]  __kasan_kmalloc+0xb7/0xc0
[   12.376886]  __kmalloc_noprof+0x1c9/0x500
[   12.377131]  x509_fabricate_name.isra.0+0x3c2/0x830
[   12.377411]  x509_note_subject+0x9b/0xf0
[   12.377646]  asn1_ber_decoder+0xe13/0x1c60
[   12.377836]  x509_cert_parse+0x1be/0x830
[   12.377998]  x509_key_preparse+0x68/0x8a0
[   12.378195]  asymmetric_key_preparse+0xb1/0x160
[   12.378388]  __key_create_or_update+0x43d/0xcc0
[   12.378921]  key_create_or_update+0x17/0x20
[   12.379108]  x509_load_certificate_list+0x174/0x200
[   12.379444]  regulatory_init_db+0xee/0x3a0
[   12.379755]  do_one_initcall+0xd8/0x370
[   12.379909]  kernel_init_freeable+0x420/0x6f0
[   12.380239]  kernel_init+0x23/0x1e0
[   12.380514]  ret_from_fork+0x116/0x1d0
[   12.380761]  ret_from_fork_asm+0x1a/0x30
[   12.380953] 
[   12.381145] Freed by task 1:
[   12.381284]  kasan_save_stack+0x45/0x70
[   12.381489]  kasan_save_track+0x18/0x40
[   12.381892]  kasan_save_free_info+0x3f/0x60
[   12.382165]  __kasan_slab_free+0x56/0x70
[   12.382308]  kfree+0x222/0x3f0
[   12.382627]  x509_free_certificate.part.0+0xa9/0x140
[   12.382848]  x509_free_certificate+0x17/0x30
[   12.383046]  x509_key_preparse+0x5c9/0x8a0
[   12.383227]  asymmetric_key_preparse+0xb1/0x160
[   12.383428]  __key_create_or_update+0x43d/0xcc0
[   12.383862]  key_create_or_update+0x17/0x20
[   12.384131]  x509_load_certificate_list+0x174/0x200
[   12.384311]  regulatory_init_db+0xee/0x3a0
[   12.384737]  do_one_initcall+0xd8/0x370
[   12.384926]  kernel_init_freeable+0x420/0x6f0
[   12.385136]  kernel_init+0x23/0x1e0
[   12.385410]  ret_from_fork+0x116/0x1d0
[   12.385671]  ret_from_fork_asm+0x1a/0x30
[   12.385998] 
[   12.386105] The buggy address belongs to the object at ffff88810254a240
[   12.386105]  which belongs to the cache kmalloc-16 of size 16
[   12.386717] The buggy address is located 15 bytes to the right of
[   12.386717]  allocated 16-byte region [ffff88810254a240, ffff88810254a250)
[   12.387217] 
[   12.387310] The buggy address belongs to the physical page:
[   12.387575] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10254a
[   12.388173] flags: 0x200000000000000(node=0|zone=2)
[   12.388525] page_type: f5(slab)
[   12.388672] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.389097] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.389489] page dumped because: kasan: bad access detected
[   12.389732] 
[   12.389897] Memory state around the buggy address:
[   12.390226]  ffff88810254a100: 00 02 fc fc 00 03 fc fc fa fb fc fc 00 02 fc fc
[   12.390632]  ffff88810254a180: 00 05 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc
[   12.390940] >ffff88810254a200: 00 02 fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   12.391226]                                                     ^
[   12.391484]  ffff88810254a280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.391994]  ffff88810254a300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.392365] ==================================================================