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

Environment
qemu-arm64
qemu-x86_64

[   21.946065] ==================================================================
[   21.946429] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   21.946635] Write of size 1 at addr fff00000c6435f00 by task kunit_try_catch/148
[   21.946859] 
[   21.946946] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT 
[   21.947578] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.947695] Hardware name: linux,dummy-virt (DT)
[   21.947856] Call trace:
[   21.947957]  show_stack+0x20/0x38 (C)
[   21.948100]  dump_stack_lvl+0x8c/0xd0
[   21.948218]  print_report+0x118/0x608
[   21.948330]  kasan_report+0xdc/0x128
[   21.948461]  __asan_report_store1_noabort+0x20/0x30
[   21.948601]  kmalloc_big_oob_right+0x2a4/0x2f0
[   21.948753]  kunit_try_run_case+0x170/0x3f0
[   21.948927]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.949114]  kthread+0x328/0x630
[   21.949277]  ret_from_fork+0x10/0x20
[   21.949416] 
[   21.949460] Allocated by task 148:
[   21.949525]  kasan_save_stack+0x3c/0x68
[   21.949626]  kasan_save_track+0x20/0x40
[   21.949721]  kasan_save_alloc_info+0x40/0x58
[   21.949816]  __kasan_kmalloc+0xd4/0xd8
[   21.949905]  __kmalloc_cache_noprof+0x16c/0x3c0
[   21.950014]  kmalloc_big_oob_right+0xb8/0x2f0
[   21.950115]  kunit_try_run_case+0x170/0x3f0
[   21.950212]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.950338]  kthread+0x328/0x630
[   21.951180]  ret_from_fork+0x10/0x20
[   21.951340] 
[   21.951430] The buggy address belongs to the object at fff00000c6434000
[   21.951430]  which belongs to the cache kmalloc-8k of size 8192
[   21.951588] The buggy address is located 0 bytes to the right of
[   21.951588]  allocated 7936-byte region [fff00000c6434000, fff00000c6435f00)
[   21.951859] 
[   21.951940] The buggy address belongs to the physical page:
[   21.952141] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106430
[   21.952731] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.952856] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.953060] page_type: f5(slab)
[   21.953251] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   21.953448] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   21.953669] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   21.953809] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   21.953977] head: 0bfffe0000000003 ffffc1ffc3190c01 00000000ffffffff 00000000ffffffff
[   21.954122] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   21.954224] page dumped because: kasan: bad access detected
[   21.954314] 
[   21.954362] Memory state around the buggy address:
[   21.954457]  fff00000c6435e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.954571]  fff00000c6435e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.954680] >fff00000c6435f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.954774]                    ^
[   21.954847]  fff00000c6435f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.954951]  fff00000c6436000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.955049] ==================================================================

[   12.930033] ==================================================================
[   12.930539] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   12.931253] Write of size 1 at addr ffff8881027cdf00 by task kunit_try_catch/164
[   12.932250] 
[   12.932474] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   12.932572] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.932887] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.932929] Call Trace:
[   12.932952]  <TASK>
[   12.932983]  dump_stack_lvl+0x73/0xb0
[   12.933038]  print_report+0xd1/0x650
[   12.933072]  ? __virt_addr_valid+0x1db/0x2d0
[   12.933104]  ? kmalloc_big_oob_right+0x316/0x370
[   12.933135]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.933167]  ? kmalloc_big_oob_right+0x316/0x370
[   12.933205]  kasan_report+0x141/0x180
[   12.933246]  ? kmalloc_big_oob_right+0x316/0x370
[   12.933298]  __asan_report_store1_noabort+0x1b/0x30
[   12.933338]  kmalloc_big_oob_right+0x316/0x370
[   12.933381]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.933431]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.933474]  kunit_try_run_case+0x1a5/0x480
[   12.933515]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.933539]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.933586]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.933614]  ? __kthread_parkme+0x82/0x180
[   12.933637]  ? preempt_count_sub+0x50/0x80
[   12.933673]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.933702]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.933724]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.933745]  kthread+0x337/0x6f0
[   12.933762]  ? trace_preempt_on+0x20/0xc0
[   12.933786]  ? __pfx_kthread+0x10/0x10
[   12.933804]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.933824]  ? calculate_sigpending+0x7b/0xa0
[   12.933845]  ? __pfx_kthread+0x10/0x10
[   12.933863]  ret_from_fork+0x41/0x80
[   12.933884]  ? __pfx_kthread+0x10/0x10
[   12.933902]  ret_from_fork_asm+0x1a/0x30
[   12.933931]  </TASK>
[   12.933946] 
[   12.943330] Allocated by task 164:
[   12.943570]  kasan_save_stack+0x45/0x70
[   12.943820]  kasan_save_track+0x18/0x40
[   12.944022]  kasan_save_alloc_info+0x3b/0x50
[   12.944364]  __kasan_kmalloc+0xb7/0xc0
[   12.944693]  __kmalloc_cache_noprof+0x189/0x420
[   12.945039]  kmalloc_big_oob_right+0xa9/0x370
[   12.945354]  kunit_try_run_case+0x1a5/0x480
[   12.945703]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.946088]  kthread+0x337/0x6f0
[   12.946316]  ret_from_fork+0x41/0x80
[   12.946625]  ret_from_fork_asm+0x1a/0x30
[   12.946835] 
[   12.946998] The buggy address belongs to the object at ffff8881027cc000
[   12.946998]  which belongs to the cache kmalloc-8k of size 8192
[   12.947506] The buggy address is located 0 bytes to the right of
[   12.947506]  allocated 7936-byte region [ffff8881027cc000, ffff8881027cdf00)
[   12.948386] 
[   12.948507] The buggy address belongs to the physical page:
[   12.949033] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027c8
[   12.949451] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.949753] flags: 0x200000000000040(head|node=0|zone=2)
[   12.950010] page_type: f5(slab)
[   12.950202] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.950797] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.951356] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.951952] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.952466] head: 0200000000000003 ffffea000409f201 00000000ffffffff 00000000ffffffff
[   12.953011] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.953326] page dumped because: kasan: bad access detected
[   12.953525] 
[   12.953677] Memory state around the buggy address:
[   12.954032]  ffff8881027cde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.954462]  ffff8881027cde80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.954902] >ffff8881027cdf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.955323]                    ^
[   12.955523]  ffff8881027cdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.955837]  ffff8881027ce000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.956249] ==================================================================