Date
Nov. 27, 2024, 3:37 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 47.831753] ================================================================== [ 47.832917] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0 [ 47.834128] Write of size 128 at addr fff00000c6189400 by task kunit_try_catch/159 [ 47.834972] [ 47.836025] CPU: 0 UID: 0 PID: 159 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241127 #1 [ 47.838080] Tainted: [B]=BAD_PAGE, [N]=TEST [ 47.838596] Hardware name: linux,dummy-virt (DT) [ 47.839133] Call trace: [ 47.839631] show_stack+0x20/0x38 (C) [ 47.840169] dump_stack_lvl+0x8c/0xd0 [ 47.840966] print_report+0x118/0x5e0 [ 47.841727] kasan_report+0xc8/0x118 [ 47.843098] kasan_check_range+0x100/0x1a8 [ 47.843630] __asan_memset+0x34/0x78 [ 47.844118] kmalloc_oob_in_memset+0x144/0x2d0 [ 47.844893] kunit_try_run_case+0x14c/0x3d0 [ 47.845563] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 47.846357] kthread+0x24c/0x2d0 [ 47.847041] ret_from_fork+0x10/0x20 [ 47.847955] [ 47.848284] Allocated by task 159: [ 47.848747] kasan_save_stack+0x3c/0x68 [ 47.849584] kasan_save_track+0x20/0x40 [ 47.850185] kasan_save_alloc_info+0x40/0x58 [ 47.850811] __kasan_kmalloc+0xd4/0xd8 [ 47.851725] __kmalloc_cache_noprof+0x15c/0x3c0 [ 47.852667] kmalloc_oob_in_memset+0xb0/0x2d0 [ 47.853705] kunit_try_run_case+0x14c/0x3d0 [ 47.854354] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 47.855041] kthread+0x24c/0x2d0 [ 47.855753] ret_from_fork+0x10/0x20 [ 47.856340] [ 47.856626] The buggy address belongs to the object at fff00000c6189400 [ 47.856626] which belongs to the cache kmalloc-128 of size 128 [ 47.858688] The buggy address is located 0 bytes inside of [ 47.858688] allocated 120-byte region [fff00000c6189400, fff00000c6189478) [ 47.860082] [ 47.860603] The buggy address belongs to the physical page: [ 47.861896] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106189 [ 47.863109] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 47.863923] page_type: f5(slab) [ 47.864387] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 47.865621] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 47.866681] page dumped because: kasan: bad access detected [ 47.867344] [ 47.867791] Memory state around the buggy address: [ 47.868829] fff00000c6189300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc [ 47.870073] fff00000c6189380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.871030] >fff00000c6189400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 47.871700] ^ [ 47.872788] fff00000c6189480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.874449] fff00000c6189500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.875167] ==================================================================
[ 25.058879] ================================================================== [ 25.059882] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x160/0x320 [ 25.060904] Write of size 128 at addr ffff888102a46d00 by task kunit_try_catch/178 [ 25.061624] [ 25.061873] CPU: 0 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241127 #1 [ 25.062714] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.063085] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.064072] Call Trace: [ 25.064435] <TASK> [ 25.064643] dump_stack_lvl+0x73/0xb0 [ 25.065124] print_report+0xd1/0x640 [ 25.065589] ? __virt_addr_valid+0x1db/0x2d0 [ 25.066014] ? kasan_complete_mode_report_info+0x2a/0x200 [ 25.066544] kasan_report+0x102/0x140 [ 25.067033] ? kmalloc_oob_in_memset+0x160/0x320 [ 25.067890] ? kmalloc_oob_in_memset+0x160/0x320 [ 25.068567] kasan_check_range+0x10c/0x1c0 [ 25.069141] __asan_memset+0x27/0x50 [ 25.069425] kmalloc_oob_in_memset+0x160/0x320 [ 25.069933] ? __pfx_kmalloc_oob_in_memset+0x10/0x10 [ 25.070367] ? __schedule+0xc3e/0x2790 [ 25.070836] ? __pfx_read_tsc+0x10/0x10 [ 25.071401] ? ktime_get_ts64+0x84/0x230 [ 25.071829] kunit_try_run_case+0x1b3/0x490 [ 25.072433] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.072812] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 25.073422] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.073845] ? __kthread_parkme+0x82/0x160 [ 25.074231] ? preempt_count_sub+0x50/0x80 [ 25.074630] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.075607] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.076290] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.076764] kthread+0x257/0x310 [ 25.077138] ? __pfx_kthread+0x10/0x10 [ 25.077834] ret_from_fork+0x41/0x80 [ 25.078219] ? __pfx_kthread+0x10/0x10 [ 25.078661] ret_from_fork_asm+0x1a/0x30 [ 25.079105] </TASK> [ 25.079481] [ 25.079703] Allocated by task 178: [ 25.080086] kasan_save_stack+0x3d/0x60 [ 25.080455] kasan_save_track+0x18/0x40 [ 25.080761] kasan_save_alloc_info+0x3b/0x50 [ 25.081357] __kasan_kmalloc+0xb7/0xc0 [ 25.081744] __kmalloc_cache_noprof+0x184/0x410 [ 25.082108] kmalloc_oob_in_memset+0xad/0x320 [ 25.082429] kunit_try_run_case+0x1b3/0x490 [ 25.082925] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.083851] kthread+0x257/0x310 [ 25.084329] ret_from_fork+0x41/0x80 [ 25.084597] ret_from_fork_asm+0x1a/0x30 [ 25.084874] [ 25.085399] The buggy address belongs to the object at ffff888102a46d00 [ 25.085399] which belongs to the cache kmalloc-128 of size 128 [ 25.086734] The buggy address is located 0 bytes inside of [ 25.086734] allocated 120-byte region [ffff888102a46d00, ffff888102a46d78) [ 25.087864] [ 25.088042] The buggy address belongs to the physical page: [ 25.088378] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a46 [ 25.089466] flags: 0x200000000000000(node=0|zone=2) [ 25.090243] page_type: f5(slab) [ 25.091912] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 25.092722] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 25.093180] page dumped because: kasan: bad access detected [ 25.093505] [ 25.093648] Memory state around the buggy address: [ 25.093847] ffff888102a46c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.094558] ffff888102a46c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.096118] >ffff888102a46d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 25.096730] ^ [ 25.097288] ffff888102a46d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.097846] ffff888102a46e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.098404] ==================================================================