Hay
Date
April 20, 2025, 11:09 p.m.

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

[   23.262916] ==================================================================
[   23.263059] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   23.263388] Write of size 2 at addr fff00000c413ce77 by task kunit_try_catch/174
[   23.263602] 
[   23.263746] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   23.263963] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.264035] Hardware name: linux,dummy-virt (DT)
[   23.264111] Call trace:
[   23.264170]  show_stack+0x20/0x38 (C)
[   23.264288]  dump_stack_lvl+0x8c/0xd0
[   23.264405]  print_report+0x118/0x608
[   23.264515]  kasan_report+0xdc/0x128
[   23.264636]  kasan_check_range+0x100/0x1a8
[   23.264857]  __asan_memset+0x34/0x78
[   23.265042]  kmalloc_oob_memset_2+0x150/0x2f8
[   23.265662]  kunit_try_run_case+0x170/0x3f0
[   23.266287]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.267469]  kthread+0x328/0x630
[   23.267799]  ret_from_fork+0x10/0x20
[   23.268088] 
[   23.268163] Allocated by task 174:
[   23.268231]  kasan_save_stack+0x3c/0x68
[   23.268323]  kasan_save_track+0x20/0x40
[   23.268409]  kasan_save_alloc_info+0x40/0x58
[   23.268502]  __kasan_kmalloc+0xd4/0xd8
[   23.268638]  __kmalloc_cache_noprof+0x15c/0x3c0
[   23.268760]  kmalloc_oob_memset_2+0xb0/0x2f8
[   23.268868]  kunit_try_run_case+0x170/0x3f0
[   23.269314]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.269818]  kthread+0x328/0x630
[   23.269960]  ret_from_fork+0x10/0x20
[   23.270133] 
[   23.270241] The buggy address belongs to the object at fff00000c413ce00
[   23.270241]  which belongs to the cache kmalloc-128 of size 128
[   23.270373] The buggy address is located 119 bytes inside of
[   23.270373]  allocated 120-byte region [fff00000c413ce00, fff00000c413ce78)
[   23.270513] 
[   23.271076] The buggy address belongs to the physical page:
[   23.271181] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10413c
[   23.271317] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.271635] page_type: f5(slab)
[   23.271746] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.272509] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.272605] page dumped because: kasan: bad access detected
[   23.273560] 
[   23.273688] Memory state around the buggy address:
[   23.273960]  fff00000c413cd00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.274156]  fff00000c413cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.274464] >fff00000c413ce00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.274556]                                                                 ^
[   23.274666]  fff00000c413ce80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.275597]  fff00000c413cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.275772] ==================================================================

[   11.587342] ==================================================================
[   11.588036] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   11.588376] Write of size 2 at addr ffff888102b31b77 by task kunit_try_catch/192
[   11.588686] 
[   11.588830] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   11.588871] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.588882] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.588955] Call Trace:
[   11.588969]  <TASK>
[   11.588983]  dump_stack_lvl+0x73/0xb0
[   11.589008]  print_report+0xd1/0x650
[   11.589030]  ? __virt_addr_valid+0x1db/0x2d0
[   11.589052]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.589073]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.589094]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.589116]  kasan_report+0x141/0x180
[   11.589150]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.589177]  kasan_check_range+0x10c/0x1c0
[   11.589200]  __asan_memset+0x27/0x50
[   11.589220]  kmalloc_oob_memset_2+0x166/0x330
[   11.589242]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   11.589265]  ? __schedule+0x10cc/0x2b30
[   11.589288]  ? __pfx_read_tsc+0x10/0x10
[   11.589307]  ? ktime_get_ts64+0x86/0x230
[   11.589343]  kunit_try_run_case+0x1a5/0x480
[   11.589366]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.589386]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.589409]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.589432]  ? __kthread_parkme+0x82/0x180
[   11.589452]  ? preempt_count_sub+0x50/0x80
[   11.589643]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.589666]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.589689]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.589711]  kthread+0x337/0x6f0
[   11.589731]  ? trace_preempt_on+0x20/0xc0
[   11.589754]  ? __pfx_kthread+0x10/0x10
[   11.589782]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.589804]  ? calculate_sigpending+0x7b/0xa0
[   11.589825]  ? __pfx_kthread+0x10/0x10
[   11.589846]  ret_from_fork+0x41/0x80
[   11.589866]  ? __pfx_kthread+0x10/0x10
[   11.589887]  ret_from_fork_asm+0x1a/0x30
[   11.589918]  </TASK>
[   11.589928] 
[   11.597190] Allocated by task 192:
[   11.597359]  kasan_save_stack+0x45/0x70
[   11.597601]  kasan_save_track+0x18/0x40
[   11.597801]  kasan_save_alloc_info+0x3b/0x50
[   11.598004]  __kasan_kmalloc+0xb7/0xc0
[   11.598216]  __kmalloc_cache_noprof+0x189/0x420
[   11.598526]  kmalloc_oob_memset_2+0xac/0x330
[   11.598752]  kunit_try_run_case+0x1a5/0x480
[   11.598912]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.599151]  kthread+0x337/0x6f0
[   11.599320]  ret_from_fork+0x41/0x80
[   11.599584]  ret_from_fork_asm+0x1a/0x30
[   11.599767] 
[   11.599837] The buggy address belongs to the object at ffff888102b31b00
[   11.599837]  which belongs to the cache kmalloc-128 of size 128
[   11.600345] The buggy address is located 119 bytes inside of
[   11.600345]  allocated 120-byte region [ffff888102b31b00, ffff888102b31b78)
[   11.600893] 
[   11.600990] The buggy address belongs to the physical page:
[   11.601256] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b31
[   11.601503] flags: 0x200000000000000(node=0|zone=2)
[   11.601664] page_type: f5(slab)
[   11.601787] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.602163] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.602771] page dumped because: kasan: bad access detected
[   11.603031] 
[   11.603124] Memory state around the buggy address:
[   11.603372]  ffff888102b31a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.603741]  ffff888102b31a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.603989] >ffff888102b31b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.604285]                                                                 ^
[   11.604792]  ffff888102b31b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.605078]  ffff888102b31c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.605350] ==================================================================

[   21.469673] ==================================================================
[   21.470748] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   21.471427] Write of size 2 at addr ffff00000df93477 by task kunit_try_catch/226
[   21.472099] 
[   21.472257] CPU: 2 UID: 0 PID: 226 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   21.472291] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.472302] Hardware name: Radxa ROCK Pi 4B (DT)
[   21.472314] Call trace:
[   21.472323]  show_stack+0x20/0x38 (C)
[   21.472347]  dump_stack_lvl+0x8c/0xd0
[   21.472370]  print_report+0x118/0x608
[   21.472391]  kasan_report+0xdc/0x128
[   21.472411]  kasan_check_range+0x100/0x1a8
[   21.472433]  __asan_memset+0x34/0x78
[   21.472454]  kmalloc_oob_memset_2+0x150/0x2f8
[   21.472477]  kunit_try_run_case+0x170/0x3f0
[   21.472503]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.472531]  kthread+0x328/0x630
[   21.472555]  ret_from_fork+0x10/0x20
[   21.472579] 
[   21.478388] Allocated by task 226:
[   21.478706]  kasan_save_stack+0x3c/0x68
[   21.479069]  kasan_save_track+0x20/0x40
[   21.479428]  kasan_save_alloc_info+0x40/0x58
[   21.479829]  __kasan_kmalloc+0xd4/0xd8
[   21.480181]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.480609]  kmalloc_oob_memset_2+0xb0/0x2f8
[   21.481010]  kunit_try_run_case+0x170/0x3f0
[   21.481405]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.481916]  kthread+0x328/0x630
[   21.482228]  ret_from_fork+0x10/0x20
[   21.482565] 
[   21.482712] The buggy address belongs to the object at ffff00000df93400
[   21.482712]  which belongs to the cache kmalloc-128 of size 128
[   21.483830] The buggy address is located 119 bytes inside of
[   21.483830]  allocated 120-byte region [ffff00000df93400, ffff00000df93478)
[   21.484957] 
[   21.485104] The buggy address belongs to the physical page:
[   21.485612] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xdf93
[   21.486323] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   21.486920] page_type: f5(slab)
[   21.487222] raw: 03fffe0000000000 ffff000000402a00 dead000000000122 0000000000000000
[   21.487924] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.488620] page dumped because: kasan: bad access detected
[   21.489125] 
[   21.489272] Memory state around the buggy address:
[   21.489710]  ffff00000df93300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.490364]  ffff00000df93380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.491018] >ffff00000df93400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   21.491668]                                                                 ^
[   21.492311]  ffff00000df93480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.492964]  ffff00000df93500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.493615] ==================================================================