Hay
Date
July 12, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.412063] ==================================================================
[   16.412129] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   16.412193] Read of size 1 at addr fff00000c7929000 by task kunit_try_catch/140
[   16.412242] 
[   16.412271] CPU: 1 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.412877] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.412905] Hardware name: linux,dummy-virt (DT)
[   16.412935] Call trace:
[   16.412956]  show_stack+0x20/0x38 (C)
[   16.413005]  dump_stack_lvl+0x8c/0xd0
[   16.413050]  print_report+0x118/0x5d0
[   16.413103]  kasan_report+0xdc/0x128
[   16.413317]  __asan_report_load1_noabort+0x20/0x30
[   16.413468]  kmalloc_node_oob_right+0x2f4/0x330
[   16.413726]  kunit_try_run_case+0x170/0x3f0
[   16.413958]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.414132]  kthread+0x328/0x630
[   16.414208]  ret_from_fork+0x10/0x20
[   16.414387] 
[   16.414406] Allocated by task 140:
[   16.414433]  kasan_save_stack+0x3c/0x68
[   16.414480]  kasan_save_track+0x20/0x40
[   16.414584]  kasan_save_alloc_info+0x40/0x58
[   16.414625]  __kasan_kmalloc+0xd4/0xd8
[   16.414660]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   16.414700]  kmalloc_node_oob_right+0xbc/0x330
[   16.414737]  kunit_try_run_case+0x170/0x3f0
[   16.414772]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.414814]  kthread+0x328/0x630
[   16.414854]  ret_from_fork+0x10/0x20
[   16.414889] 
[   16.414908] The buggy address belongs to the object at fff00000c7928000
[   16.414908]  which belongs to the cache kmalloc-4k of size 4096
[   16.415256] The buggy address is located 0 bytes to the right of
[   16.415256]  allocated 4096-byte region [fff00000c7928000, fff00000c7929000)
[   16.415408] 
[   16.415480] The buggy address belongs to the physical page:
[   16.415972] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107928
[   16.416486] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.416743] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.416849] page_type: f5(slab)
[   16.416997] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   16.417048] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   16.417135] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   16.417196] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   16.417268] head: 0bfffe0000000003 ffffc1ffc31e4a01 00000000ffffffff 00000000ffffffff
[   16.417320] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   16.417364] page dumped because: kasan: bad access detected
[   16.417634] 
[   16.417655] Memory state around the buggy address:
[   16.417687]  fff00000c7928f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.417989]  fff00000c7928f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.418035] >fff00000c7929000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.418482]                    ^
[   16.418560]  fff00000c7929080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.418603]  fff00000c7929100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.418679] ==================================================================

[   12.275231] ==================================================================
[   12.275682] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   12.275975] Read of size 1 at addr ffff8881039fb000 by task kunit_try_catch/157
[   12.276297] 
[   12.276682] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.276729] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.276741] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.276763] Call Trace:
[   12.276775]  <TASK>
[   12.276791]  dump_stack_lvl+0x73/0xb0
[   12.276824]  print_report+0xd1/0x610
[   12.276847]  ? __virt_addr_valid+0x1db/0x2d0
[   12.276872]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.276896]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.276919]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.276943]  kasan_report+0x141/0x180
[   12.276965]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.277009]  __asan_report_load1_noabort+0x18/0x20
[   12.277034]  kmalloc_node_oob_right+0x369/0x3c0
[   12.277060]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   12.277085]  ? __schedule+0x10cc/0x2b60
[   12.277107]  ? __pfx_read_tsc+0x10/0x10
[   12.277129]  ? ktime_get_ts64+0x86/0x230
[   12.277156]  kunit_try_run_case+0x1a5/0x480
[   12.277182]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.277205]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.277230]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.277254]  ? __kthread_parkme+0x82/0x180
[   12.277289]  ? preempt_count_sub+0x50/0x80
[   12.277314]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.277338]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.277362]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.277388]  kthread+0x337/0x6f0
[   12.277406]  ? trace_preempt_on+0x20/0xc0
[   12.277431]  ? __pfx_kthread+0x10/0x10
[   12.277451]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.277473]  ? calculate_sigpending+0x7b/0xa0
[   12.277498]  ? __pfx_kthread+0x10/0x10
[   12.277519]  ret_from_fork+0x116/0x1d0
[   12.277538]  ? __pfx_kthread+0x10/0x10
[   12.277558]  ret_from_fork_asm+0x1a/0x30
[   12.277590]  </TASK>
[   12.277600] 
[   12.287685] Allocated by task 157:
[   12.287874]  kasan_save_stack+0x45/0x70
[   12.288064]  kasan_save_track+0x18/0x40
[   12.288226]  kasan_save_alloc_info+0x3b/0x50
[   12.288453]  __kasan_kmalloc+0xb7/0xc0
[   12.288649]  __kmalloc_cache_node_noprof+0x188/0x420
[   12.288865]  kmalloc_node_oob_right+0xab/0x3c0
[   12.289076]  kunit_try_run_case+0x1a5/0x480
[   12.290016]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.290499]  kthread+0x337/0x6f0
[   12.290719]  ret_from_fork+0x116/0x1d0
[   12.290857]  ret_from_fork_asm+0x1a/0x30
[   12.291005] 
[   12.291078] The buggy address belongs to the object at ffff8881039fa000
[   12.291078]  which belongs to the cache kmalloc-4k of size 4096
[   12.291445] The buggy address is located 0 bytes to the right of
[   12.291445]  allocated 4096-byte region [ffff8881039fa000, ffff8881039fb000)
[   12.291814] 
[   12.291886] The buggy address belongs to the physical page:
[   12.292120] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f8
[   12.292750] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.293500] flags: 0x200000000000040(head|node=0|zone=2)
[   12.294110] page_type: f5(slab)
[   12.294442] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.295214] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.295987] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.296790] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.297530] head: 0200000000000003 ffffea00040e7e01 00000000ffffffff 00000000ffffffff
[   12.298321] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.299204] page dumped because: kasan: bad access detected
[   12.299749] 
[   12.299935] Memory state around the buggy address:
[   12.300441]  ffff8881039faf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.301232]  ffff8881039faf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.301869] >ffff8881039fb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.302686]                    ^
[   12.303026]  ffff8881039fb080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.303649]  ffff8881039fb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.304243] ==================================================================