Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.616542] ==================================================================
[   17.616616] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   17.616707] Write of size 1 at addr fff00000c7821f00 by task kunit_try_catch/146
[   17.616830] 
[   17.616860] CPU: 1 UID: 0 PID: 146 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   17.616939] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.617149] Hardware name: linux,dummy-virt (DT)
[   17.617426] Call trace:
[   17.617468]  show_stack+0x20/0x38 (C)
[   17.617573]  dump_stack_lvl+0x8c/0xd0
[   17.617622]  print_report+0x118/0x608
[   17.617665]  kasan_report+0xdc/0x128
[   17.617708]  __asan_report_store1_noabort+0x20/0x30
[   17.617756]  kmalloc_big_oob_right+0x2a4/0x2f0
[   17.617813]  kunit_try_run_case+0x170/0x3f0
[   17.617861]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.618367]  kthread+0x328/0x630
[   17.618529]  ret_from_fork+0x10/0x20
[   17.618577] 
[   17.618597] Allocated by task 146:
[   17.618624]  kasan_save_stack+0x3c/0x68
[   17.618919]  kasan_save_track+0x20/0x40
[   17.619040]  kasan_save_alloc_info+0x40/0x58
[   17.619083]  __kasan_kmalloc+0xd4/0xd8
[   17.619119]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.619171]  kmalloc_big_oob_right+0xb8/0x2f0
[   17.619233]  kunit_try_run_case+0x170/0x3f0
[   17.619278]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.619357]  kthread+0x328/0x630
[   17.619395]  ret_from_fork+0x10/0x20
[   17.619430] 
[   17.619700] The buggy address belongs to the object at fff00000c7820000
[   17.619700]  which belongs to the cache kmalloc-8k of size 8192
[   17.619769] The buggy address is located 0 bytes to the right of
[   17.619769]  allocated 7936-byte region [fff00000c7820000, fff00000c7821f00)
[   17.619949] 
[   17.620030] The buggy address belongs to the physical page:
[   17.620117] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107820
[   17.620179] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.620441] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.620627] page_type: f5(slab)
[   17.620669] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.620718] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.620787] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.620834] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.620881] head: 0bfffe0000000003 ffffc1ffc31e0801 00000000ffffffff 00000000ffffffff
[   17.621218] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   17.621260] page dumped because: kasan: bad access detected
[   17.621312] 
[   17.621341] Memory state around the buggy address:
[   17.621392]  fff00000c7821e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.621580]  fff00000c7821e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.621622] >fff00000c7821f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.621671]                    ^
[   17.621698]  fff00000c7821f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.621737]  fff00000c7822000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.621773] ==================================================================

[   10.647412] ==================================================================
[   10.648291] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   10.648542] Write of size 1 at addr ffff888102de9f00 by task kunit_try_catch/164
[   10.649246] 
[   10.649451] CPU: 0 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   10.649498] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.649528] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.649551] Call Trace:
[   10.649576]  <TASK>
[   10.649591]  dump_stack_lvl+0x73/0xb0
[   10.649618]  print_report+0xd1/0x650
[   10.649641]  ? __virt_addr_valid+0x1db/0x2d0
[   10.649664]  ? kmalloc_big_oob_right+0x316/0x370
[   10.649687]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.649710]  ? kmalloc_big_oob_right+0x316/0x370
[   10.649734]  kasan_report+0x141/0x180
[   10.649756]  ? kmalloc_big_oob_right+0x316/0x370
[   10.649784]  __asan_report_store1_noabort+0x1b/0x30
[   10.649806]  kmalloc_big_oob_right+0x316/0x370
[   10.649831]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   10.649855]  ? __schedule+0x10cc/0x2b60
[   10.649891]  ? __pfx_read_tsc+0x10/0x10
[   10.649912]  ? ktime_get_ts64+0x86/0x230
[   10.649937]  kunit_try_run_case+0x1a5/0x480
[   10.649959]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.649978]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.650002]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.650026]  ? __kthread_parkme+0x82/0x180
[   10.650047]  ? preempt_count_sub+0x50/0x80
[   10.650073]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.650093]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.650117]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.650141]  kthread+0x337/0x6f0
[   10.650157]  ? trace_preempt_on+0x20/0xc0
[   10.650181]  ? __pfx_kthread+0x10/0x10
[   10.650199]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.650222]  ? calculate_sigpending+0x7b/0xa0
[   10.650243]  ? __pfx_kthread+0x10/0x10
[   10.650262]  ret_from_fork+0x41/0x80
[   10.650284]  ? __pfx_kthread+0x10/0x10
[   10.650302]  ret_from_fork_asm+0x1a/0x30
[   10.650332]  </TASK>
[   10.650343] 
[   10.659200] Allocated by task 164:
[   10.659431]  kasan_save_stack+0x45/0x70
[   10.659653]  kasan_save_track+0x18/0x40
[   10.659853]  kasan_save_alloc_info+0x3b/0x50
[   10.660015]  __kasan_kmalloc+0xb7/0xc0
[   10.660150]  __kmalloc_cache_noprof+0x189/0x420
[   10.660381]  kmalloc_big_oob_right+0xa9/0x370
[   10.660971]  kunit_try_run_case+0x1a5/0x480
[   10.661145]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.661327]  kthread+0x337/0x6f0
[   10.661475]  ret_from_fork+0x41/0x80
[   10.661859]  ret_from_fork_asm+0x1a/0x30
[   10.662055] 
[   10.662151] The buggy address belongs to the object at ffff888102de8000
[   10.662151]  which belongs to the cache kmalloc-8k of size 8192
[   10.662636] The buggy address is located 0 bytes to the right of
[   10.662636]  allocated 7936-byte region [ffff888102de8000, ffff888102de9f00)
[   10.663106] 
[   10.663246] The buggy address belongs to the physical page:
[   10.663491] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102de8
[   10.663793] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.664141] flags: 0x200000000000040(head|node=0|zone=2)
[   10.664345] page_type: f5(slab)
[   10.664516] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.664842] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.665199] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.665556] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.665803] head: 0200000000000003 ffffea00040b7a01 00000000ffffffff 00000000ffffffff
[   10.666051] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.666410] page dumped because: kasan: bad access detected
[   10.666665] 
[   10.666782] Memory state around the buggy address:
[   10.667065]  ffff888102de9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.667407]  ffff888102de9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.667923] >ffff888102de9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.668272]                    ^
[   10.668392]  ffff888102de9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.669017]  ffff888102dea000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.669375] ==================================================================