Hay
Date
April 22, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   17.730687] ==================================================================
[   17.730871] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   17.731032] Write of size 2 at addr fff00000c62d4877 by task kunit_try_catch/174
[   17.731139] 
[   17.731213] CPU: 1 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   17.731423] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.731497] Hardware name: linux,dummy-virt (DT)
[   17.731577] Call trace:
[   17.731817]  show_stack+0x20/0x38 (C)
[   17.732253]  dump_stack_lvl+0x8c/0xd0
[   17.732417]  print_report+0x118/0x608
[   17.732525]  kasan_report+0xdc/0x128
[   17.732645]  kasan_check_range+0x100/0x1a8
[   17.732799]  __asan_memset+0x34/0x78
[   17.733072]  kmalloc_oob_memset_2+0x150/0x2f8
[   17.733237]  kunit_try_run_case+0x170/0x3f0
[   17.733682]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.734392]  kthread+0x328/0x630
[   17.734571]  ret_from_fork+0x10/0x20
[   17.734679] 
[   17.734720] Allocated by task 174:
[   17.735384]  kasan_save_stack+0x3c/0x68
[   17.735490]  kasan_save_track+0x20/0x40
[   17.735582]  kasan_save_alloc_info+0x40/0x58
[   17.735690]  __kasan_kmalloc+0xd4/0xd8
[   17.735902]  __kmalloc_cache_noprof+0x15c/0x3c0
[   17.736118]  kmalloc_oob_memset_2+0xb0/0x2f8
[   17.736771]  kunit_try_run_case+0x170/0x3f0
[   17.737025]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.737175]  kthread+0x328/0x630
[   17.737325]  ret_from_fork+0x10/0x20
[   17.737615] 
[   17.737787] The buggy address belongs to the object at fff00000c62d4800
[   17.737787]  which belongs to the cache kmalloc-128 of size 128
[   17.737936] The buggy address is located 119 bytes inside of
[   17.737936]  allocated 120-byte region [fff00000c62d4800, fff00000c62d4878)
[   17.738463] 
[   17.738520] The buggy address belongs to the physical page:
[   17.738701] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1062d4
[   17.738949] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.739142] page_type: f5(slab)
[   17.739251] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.739380] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.739472] page dumped because: kasan: bad access detected
[   17.739551] 
[   17.739593] Memory state around the buggy address:
[   17.739663]  fff00000c62d4700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.739757]  fff00000c62d4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.739848] >fff00000c62d4800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.739933]                                                                 ^
[   17.740049]  fff00000c62d4880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.740132]  fff00000c62d4900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.740212] ==================================================================

[   18.128751] ==================================================================
[   18.130030] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   18.131224] Write of size 2 at addr ffff888103199977 by task kunit_try_catch/192
[   18.133148] 
[   18.133386] CPU: 0 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   18.133786] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.133816] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.133879] Call Trace:
[   18.133925]  <TASK>
[   18.133969]  dump_stack_lvl+0x73/0xb0
[   18.134055]  print_report+0xd1/0x650
[   18.134115]  ? __virt_addr_valid+0x1db/0x2d0
[   18.134171]  ? kmalloc_oob_memset_2+0x166/0x330
[   18.134311]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.134376]  ? kmalloc_oob_memset_2+0x166/0x330
[   18.134414]  kasan_report+0x141/0x180
[   18.134705]  ? kmalloc_oob_memset_2+0x166/0x330
[   18.134758]  kasan_check_range+0x10c/0x1c0
[   18.134795]  __asan_memset+0x27/0x50
[   18.134825]  kmalloc_oob_memset_2+0x166/0x330
[   18.134858]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   18.134891]  ? __schedule+0x10cc/0x2b30
[   18.134927]  ? __pfx_read_tsc+0x10/0x10
[   18.134956]  ? ktime_get_ts64+0x86/0x230
[   18.134994]  kunit_try_run_case+0x1a5/0x480
[   18.135029]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.135060]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.135094]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.135127]  ? __kthread_parkme+0x82/0x180
[   18.135157]  ? preempt_count_sub+0x50/0x80
[   18.135192]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.135225]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.135256]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.135287]  kthread+0x337/0x6f0
[   18.135317]  ? trace_preempt_on+0x20/0xc0
[   18.135351]  ? __pfx_kthread+0x10/0x10
[   18.135382]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.135413]  ? calculate_sigpending+0x7b/0xa0
[   18.135491]  ? __pfx_kthread+0x10/0x10
[   18.135583]  ret_from_fork+0x41/0x80
[   18.135615]  ? __pfx_kthread+0x10/0x10
[   18.135647]  ret_from_fork_asm+0x1a/0x30
[   18.135693]  </TASK>
[   18.135707] 
[   18.153850] Allocated by task 192:
[   18.154329]  kasan_save_stack+0x45/0x70
[   18.154979]  kasan_save_track+0x18/0x40
[   18.155400]  kasan_save_alloc_info+0x3b/0x50
[   18.156407]  __kasan_kmalloc+0xb7/0xc0
[   18.156853]  __kmalloc_cache_noprof+0x189/0x420
[   18.157643]  kmalloc_oob_memset_2+0xac/0x330
[   18.158162]  kunit_try_run_case+0x1a5/0x480
[   18.158635]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.159079]  kthread+0x337/0x6f0
[   18.159476]  ret_from_fork+0x41/0x80
[   18.160075]  ret_from_fork_asm+0x1a/0x30
[   18.160584] 
[   18.160860] The buggy address belongs to the object at ffff888103199900
[   18.160860]  which belongs to the cache kmalloc-128 of size 128
[   18.162202] The buggy address is located 119 bytes inside of
[   18.162202]  allocated 120-byte region [ffff888103199900, ffff888103199978)
[   18.163112] 
[   18.163356] The buggy address belongs to the physical page:
[   18.164221] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103199
[   18.164969] flags: 0x200000000000000(node=0|zone=2)
[   18.165641] page_type: f5(slab)
[   18.166060] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   18.166751] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.167413] page dumped because: kasan: bad access detected
[   18.168234] 
[   18.168461] Memory state around the buggy address:
[   18.169258]  ffff888103199800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.170102]  ffff888103199880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.170938] >ffff888103199900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.171675]                                                                 ^
[   18.172232]  ffff888103199980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.173327]  ffff888103199a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.174288] ==================================================================

[   19.779582] ==================================================================
[   19.780668] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   19.781357] Write of size 2 at addr ffff00000e73a277 by task kunit_try_catch/230
[   19.782042] 
[   19.782207] CPU: 2 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   19.782257] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.782271] Hardware name: Radxa ROCK Pi 4B (DT)
[   19.782288] Call trace:
[   19.782300]  show_stack+0x20/0x38 (C)
[   19.782333]  dump_stack_lvl+0x8c/0xd0
[   19.782364]  print_report+0x118/0x608
[   19.782394]  kasan_report+0xdc/0x128
[   19.782422]  kasan_check_range+0x100/0x1a8
[   19.782452]  __asan_memset+0x34/0x78
[   19.782482]  kmalloc_oob_memset_2+0x150/0x2f8
[   19.782515]  kunit_try_run_case+0x170/0x3f0
[   19.782551]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.782590]  kthread+0x328/0x630
[   19.782623]  ret_from_fork+0x10/0x20
[   19.782655] 
[   19.788513] Allocated by task 230:
[   19.788840]  kasan_save_stack+0x3c/0x68
[   19.789214]  kasan_save_track+0x20/0x40
[   19.789585]  kasan_save_alloc_info+0x40/0x58
[   19.789998]  __kasan_kmalloc+0xd4/0xd8
[   19.790360]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.790800]  kmalloc_oob_memset_2+0xb0/0x2f8
[   19.791215]  kunit_try_run_case+0x170/0x3f0
[   19.791622]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.792146]  kthread+0x328/0x630
[   19.792469]  ret_from_fork+0x10/0x20
[   19.792819] 
[   19.792972] The buggy address belongs to the object at ffff00000e73a200
[   19.792972]  which belongs to the cache kmalloc-128 of size 128
[   19.794105] The buggy address is located 119 bytes inside of
[   19.794105]  allocated 120-byte region [ffff00000e73a200, ffff00000e73a278)
[   19.795248] 
[   19.795402] The buggy address belongs to the physical page:
[   19.795918] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe73a
[   19.796641] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   19.797253] page_type: f5(slab)
[   19.797568] raw: 03fffe0000000000 ffff000000402a00 dead000000000122 0000000000000000
[   19.798284] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.798991] page dumped because: kasan: bad access detected
[   19.799505] 
[   19.799657] Memory state around the buggy address:
[   19.800105]  ffff00000e73a100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.800770]  ffff00000e73a180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.801435] >ffff00000e73a200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.802097]                                                                 ^
[   19.802752]  ffff00000e73a280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.803417]  ffff00000e73a300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.804078] ==================================================================