Hay
Date
June 2, 2025, 2:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.969736] ==================================================================
[   17.971080] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   17.971523] Write of size 1 at addr fff00000c6559f00 by task kunit_try_catch/134
[   17.971758] 
[   17.971875] CPU: 0 UID: 0 PID: 134 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   17.971971] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.972000] Hardware name: linux,dummy-virt (DT)
[   17.972035] Call trace:
[   17.972061]  show_stack+0x20/0x38 (C)
[   17.972119]  dump_stack_lvl+0x8c/0xd0
[   17.972200]  print_report+0x118/0x608
[   17.972253]  kasan_report+0xdc/0x128
[   17.972302]  __asan_report_store1_noabort+0x20/0x30
[   17.972351]  kmalloc_big_oob_right+0x2a4/0x2f0
[   17.972398]  kunit_try_run_case+0x170/0x3f0
[   17.972448]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.972502]  kthread+0x318/0x620
[   17.972550]  ret_from_fork+0x10/0x20
[   17.972605] 
[   17.977208] Allocated by task 134:
[   17.977783]  kasan_save_stack+0x3c/0x68
[   17.978784]  kasan_save_track+0x20/0x40
[   17.979197]  kasan_save_alloc_info+0x40/0x58
[   17.979537]  __kasan_kmalloc+0xd4/0xd8
[   17.979840]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.980246]  kmalloc_big_oob_right+0xb8/0x2f0
[   17.980604]  kunit_try_run_case+0x170/0x3f0
[   17.980936]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.981923]  kthread+0x318/0x620
[   17.982534]  ret_from_fork+0x10/0x20
[   17.983084] 
[   17.983344] The buggy address belongs to the object at fff00000c6558000
[   17.983344]  which belongs to the cache kmalloc-8k of size 8192
[   17.984326] The buggy address is located 0 bytes to the right of
[   17.984326]  allocated 7936-byte region [fff00000c6558000, fff00000c6559f00)
[   17.985325] 
[   17.985596] The buggy address belongs to the physical page:
[   17.986389] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106558
[   17.987102] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.987636] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.988096] page_type: f5(slab)
[   17.988387] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.988933] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.989491] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.989955] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.991484] head: 0bfffe0000000003 ffffc1ffc3195601 ffffffffffffffff 0000000000000000
[   17.992359] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
[   17.992994] page dumped because: kasan: bad access detected
[   17.993491] 
[   17.993766] Memory state around the buggy address:
[   17.994384]  fff00000c6559e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.994715]  fff00000c6559e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.995038] >fff00000c6559f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.995360]                    ^
[   17.995559]  fff00000c6559f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.995885]  fff00000c655a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.996820] ==================================================================

[   12.197208] ==================================================================
[   12.197836] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x318/0x370
[   12.198136] Write of size 1 at addr ffff888102bc1f00 by task kunit_try_catch/152
[   12.198430] 
[   12.198540] CPU: 1 UID: 0 PID: 152 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   12.198580] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.198591] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.198610] Call Trace:
[   12.198623]  <TASK>
[   12.198638]  dump_stack_lvl+0x73/0xb0
[   12.198664]  print_report+0xd1/0x650
[   12.198734]  ? __virt_addr_valid+0x1db/0x2d0
[   12.198758]  ? kmalloc_big_oob_right+0x318/0x370
[   12.198779]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.198816]  ? kmalloc_big_oob_right+0x318/0x370
[   12.198837]  kasan_report+0x140/0x180
[   12.198858]  ? kmalloc_big_oob_right+0x318/0x370
[   12.198883]  __asan_report_store1_noabort+0x1b/0x30
[   12.198906]  kmalloc_big_oob_right+0x318/0x370
[   12.198927]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.198948]  ? __schedule+0xce8/0x2840
[   12.198971]  ? __pfx_read_tsc+0x10/0x10
[   12.198993]  ? ktime_get_ts64+0x86/0x230
[   12.199026]  kunit_try_run_case+0x1a6/0x480
[   12.199059]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.199079]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.199102]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.199137]  ? __kthread_parkme+0x82/0x160
[   12.199158]  ? preempt_count_sub+0x50/0x80
[   12.199182]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.199214]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.199240]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.199265]  kthread+0x324/0x6e0
[   12.199285]  ? trace_preempt_on+0x20/0xc0
[   12.199308]  ? __pfx_kthread+0x10/0x10
[   12.199329]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.199350]  ? calculate_sigpending+0x7b/0xa0
[   12.199372]  ? __pfx_kthread+0x10/0x10
[   12.199393]  ret_from_fork+0x41/0x80
[   12.199411]  ? __pfx_kthread+0x10/0x10
[   12.199432]  ret_from_fork_asm+0x1a/0x30
[   12.199462]  </TASK>
[   12.199472] 
[   12.207132] Allocated by task 152:
[   12.207831]  kasan_save_stack+0x45/0x70
[   12.208795]  kasan_save_track+0x18/0x40
[   12.208993]  kasan_save_alloc_info+0x3b/0x50
[   12.209431]  __kasan_kmalloc+0xb7/0xc0
[   12.209945]  __kmalloc_cache_noprof+0x18a/0x420
[   12.210463]  kmalloc_big_oob_right+0xaa/0x370
[   12.210927]  kunit_try_run_case+0x1a6/0x480
[   12.211369]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.211551]  kthread+0x324/0x6e0
[   12.211971]  ret_from_fork+0x41/0x80
[   12.212406]  ret_from_fork_asm+0x1a/0x30
[   12.212915] 
[   12.213253] The buggy address belongs to the object at ffff888102bc0000
[   12.213253]  which belongs to the cache kmalloc-8k of size 8192
[   12.214381] The buggy address is located 0 bytes to the right of
[   12.214381]  allocated 7936-byte region [ffff888102bc0000, ffff888102bc1f00)
[   12.215250] 
[   12.215421] The buggy address belongs to the physical page:
[   12.216051] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102bc0
[   12.216293] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.216508] flags: 0x200000000000040(head|node=0|zone=2)
[   12.216695] page_type: f5(slab)
[   12.216894] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.217534] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.217917] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.218244] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.218559] head: 0200000000000003 ffffea00040af001 ffffffffffffffff 0000000000000000
[   12.218868] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
[   12.219184] page dumped because: kasan: bad access detected
[   12.219416] 
[   12.219494] Memory state around the buggy address:
[   12.219716]  ffff888102bc1e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.220005]  ffff888102bc1e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.221004] >ffff888102bc1f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.221485]                    ^
[   12.221620]  ffff888102bc1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.222058]  ffff888102bc2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.222456] ==================================================================