Date
Nov. 20, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 39.582319] ================================================================== [ 39.583546] BUG: KASAN: slab-out-of-bounds in memchr+0x78/0x88 [ 39.584274] Read of size 1 at addr fff00000c65bf718 by task kunit_try_catch/244 [ 39.585466] [ 39.585837] CPU: 1 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241120 #1 [ 39.587164] Tainted: [B]=BAD_PAGE, [N]=TEST [ 39.587636] Hardware name: linux,dummy-virt (DT) [ 39.588148] Call trace: [ 39.588607] show_stack+0x20/0x38 (C) [ 39.589168] dump_stack_lvl+0x8c/0xd0 [ 39.589838] print_report+0x118/0x5e0 [ 39.590420] kasan_report+0xc8/0x118 [ 39.590997] __asan_report_load1_noabort+0x20/0x30 [ 39.591897] memchr+0x78/0x88 [ 39.592426] kasan_memchr+0x148/0x2d8 [ 39.593072] kunit_try_run_case+0x14c/0x3d0 [ 39.594046] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 39.594669] kthread+0x24c/0x2d0 [ 39.595269] ret_from_fork+0x10/0x20 [ 39.595804] [ 39.596146] Allocated by task 244: [ 39.596689] kasan_save_stack+0x3c/0x68 [ 39.597274] kasan_save_track+0x20/0x40 [ 39.597780] kasan_save_alloc_info+0x40/0x58 [ 39.598401] __kasan_kmalloc+0xd4/0xd8 [ 39.599300] __kmalloc_cache_noprof+0x15c/0x3c8 [ 39.599884] kasan_memchr+0xb0/0x2d8 [ 39.600435] kunit_try_run_case+0x14c/0x3d0 [ 39.601522] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 39.602196] kthread+0x24c/0x2d0 [ 39.602681] ret_from_fork+0x10/0x20 [ 39.603248] [ 39.604080] The buggy address belongs to the object at fff00000c65bf700 [ 39.604080] which belongs to the cache kmalloc-32 of size 32 [ 39.605537] The buggy address is located 0 bytes to the right of [ 39.605537] allocated 24-byte region [fff00000c65bf700, fff00000c65bf718) [ 39.606794] [ 39.607163] The buggy address belongs to the physical page: [ 39.607780] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065bf [ 39.608680] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 39.609878] page_type: f5(slab) [ 39.610772] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 39.611539] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 39.612409] page dumped because: kasan: bad access detected [ 39.613160] [ 39.613535] Memory state around the buggy address: [ 39.614259] fff00000c65bf600: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 39.614997] fff00000c65bf680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 39.615972] >fff00000c65bf700: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.616828] ^ [ 39.617503] fff00000c65bf780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.618281] fff00000c65bf800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.619297] ==================================================================
[ 31.186688] ================================================================== [ 31.188297] BUG: KASAN: slab-out-of-bounds in memchr+0x79/0x90 [ 31.188761] Read of size 1 at addr ffff8881029f3b18 by task kunit_try_catch/262 [ 31.190860] [ 31.191353] CPU: 1 UID: 0 PID: 262 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241120 #1 [ 31.193610] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.194273] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.195483] Call Trace: [ 31.195731] <TASK> [ 31.196708] dump_stack_lvl+0x73/0xb0 [ 31.197687] print_report+0xd1/0x640 [ 31.198828] ? __virt_addr_valid+0x1db/0x2d0 [ 31.199285] ? kasan_complete_mode_report_info+0x2a/0x200 [ 31.200509] kasan_report+0x102/0x140 [ 31.200915] ? memchr+0x79/0x90 [ 31.201405] ? memchr+0x79/0x90 [ 31.202039] __asan_report_load1_noabort+0x18/0x20 [ 31.202771] memchr+0x79/0x90 [ 31.203118] kasan_memchr+0x163/0x320 [ 31.203568] ? __pfx_kasan_memchr+0x10/0x10 [ 31.204778] ? __schedule+0xc3e/0x2790 [ 31.205228] ? __pfx_read_tsc+0x10/0x10 [ 31.205864] ? ktime_get_ts64+0x84/0x230 [ 31.206474] kunit_try_run_case+0x1b3/0x490 [ 31.207290] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.207824] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 31.208743] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.209237] ? __kthread_parkme+0x82/0x160 [ 31.209632] ? preempt_count_sub+0x50/0x80 [ 31.210081] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.210524] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.211208] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.211980] kthread+0x257/0x310 [ 31.212245] ? __pfx_kthread+0x10/0x10 [ 31.212654] ret_from_fork+0x41/0x80 [ 31.213319] ? __pfx_kthread+0x10/0x10 [ 31.214044] ret_from_fork_asm+0x1a/0x30 [ 31.214751] </TASK> [ 31.215072] [ 31.215463] Allocated by task 262: [ 31.215879] kasan_save_stack+0x3d/0x60 [ 31.216837] kasan_save_track+0x18/0x40 [ 31.217473] kasan_save_alloc_info+0x3b/0x50 [ 31.218196] __kasan_kmalloc+0xb7/0xc0 [ 31.218559] __kmalloc_cache_noprof+0x184/0x410 [ 31.219075] kasan_memchr+0xad/0x320 [ 31.219441] kunit_try_run_case+0x1b3/0x490 [ 31.220043] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.221047] kthread+0x257/0x310 [ 31.221643] ret_from_fork+0x41/0x80 [ 31.222391] ret_from_fork_asm+0x1a/0x30 [ 31.222874] [ 31.223276] The buggy address belongs to the object at ffff8881029f3b00 [ 31.223276] which belongs to the cache kmalloc-32 of size 32 [ 31.224843] The buggy address is located 0 bytes to the right of [ 31.224843] allocated 24-byte region [ffff8881029f3b00, ffff8881029f3b18) [ 31.225975] [ 31.226115] The buggy address belongs to the physical page: [ 31.227212] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029f3 [ 31.228447] flags: 0x200000000000000(node=0|zone=2) [ 31.228925] page_type: f5(slab) [ 31.229365] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 31.230066] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 31.231415] page dumped because: kasan: bad access detected [ 31.232019] [ 31.232532] Memory state around the buggy address: [ 31.232904] ffff8881029f3a00: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.234048] ffff8881029f3a80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.234557] >ffff8881029f3b00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.235671] ^ [ 31.236601] ffff8881029f3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.237988] ffff8881029f3c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.238821] ==================================================================