Date
Nov. 20, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 39.635006] ================================================================== [ 39.636480] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8 [ 39.637161] Read of size 1 at addr fff00000c65bf858 by task kunit_try_catch/246 [ 39.638593] [ 39.638976] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241120 #1 [ 39.639996] Tainted: [B]=BAD_PAGE, [N]=TEST [ 39.640662] Hardware name: linux,dummy-virt (DT) [ 39.641215] Call trace: [ 39.642009] show_stack+0x20/0x38 (C) [ 39.642639] dump_stack_lvl+0x8c/0xd0 [ 39.643205] print_report+0x118/0x5e0 [ 39.643846] kasan_report+0xc8/0x118 [ 39.644423] __asan_report_load1_noabort+0x20/0x30 [ 39.645074] memcmp+0x198/0x1d8 [ 39.645722] kasan_memcmp+0x16c/0x300 [ 39.646705] kunit_try_run_case+0x14c/0x3d0 [ 39.647332] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 39.647897] kthread+0x24c/0x2d0 [ 39.648306] ret_from_fork+0x10/0x20 [ 39.648990] [ 39.649674] Allocated by task 246: [ 39.650190] kasan_save_stack+0x3c/0x68 [ 39.650647] kasan_save_track+0x20/0x40 [ 39.651669] kasan_save_alloc_info+0x40/0x58 [ 39.652384] __kasan_kmalloc+0xd4/0xd8 [ 39.653020] __kmalloc_cache_noprof+0x15c/0x3c8 [ 39.653829] kasan_memcmp+0xbc/0x300 [ 39.654549] kunit_try_run_case+0x14c/0x3d0 [ 39.655304] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 39.656036] kthread+0x24c/0x2d0 [ 39.656385] ret_from_fork+0x10/0x20 [ 39.656793] [ 39.657224] The buggy address belongs to the object at fff00000c65bf840 [ 39.657224] which belongs to the cache kmalloc-32 of size 32 [ 39.659383] The buggy address is located 0 bytes to the right of [ 39.659383] allocated 24-byte region [fff00000c65bf840, fff00000c65bf858) [ 39.661037] [ 39.661580] The buggy address belongs to the physical page: [ 39.662573] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065bf [ 39.663354] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 39.664228] page_type: f5(slab) [ 39.664702] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 39.666281] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 39.666941] page dumped because: kasan: bad access detected [ 39.667672] [ 39.668055] Memory state around the buggy address: [ 39.668633] fff00000c65bf700: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 39.669373] fff00000c65bf780: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 39.670518] >fff00000c65bf800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 39.671480] ^ [ 39.672154] fff00000c65bf880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.673164] fff00000c65bf900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.674246] ==================================================================
[ 31.244079] ================================================================== [ 31.245110] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0 [ 31.245751] Read of size 1 at addr ffff8881029f3c18 by task kunit_try_catch/264 [ 31.246302] [ 31.246497] CPU: 1 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241120 #1 [ 31.247640] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.248253] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.248968] Call Trace: [ 31.249662] <TASK> [ 31.249952] dump_stack_lvl+0x73/0xb0 [ 31.250529] print_report+0xd1/0x640 [ 31.250941] ? __virt_addr_valid+0x1db/0x2d0 [ 31.251490] ? kasan_complete_mode_report_info+0x2a/0x200 [ 31.252013] kasan_report+0x102/0x140 [ 31.252488] ? memcmp+0x1b4/0x1d0 [ 31.252983] ? memcmp+0x1b4/0x1d0 [ 31.253506] __asan_report_load1_noabort+0x18/0x20 [ 31.254112] memcmp+0x1b4/0x1d0 [ 31.254523] kasan_memcmp+0x190/0x390 [ 31.255323] ? trace_hardirqs_on+0x37/0xe0 [ 31.255802] ? __pfx_kasan_memcmp+0x10/0x10 [ 31.256424] ? finish_task_switch.isra.0+0x153/0x700 [ 31.256983] ? __switch_to+0x5d9/0xf60 [ 31.257456] ? __pfx_read_tsc+0x10/0x10 [ 31.257940] ? ktime_get_ts64+0x84/0x230 [ 31.258468] kunit_try_run_case+0x1b3/0x490 [ 31.258851] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.259396] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 31.260225] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.260806] ? __kthread_parkme+0x82/0x160 [ 31.261427] ? preempt_count_sub+0x50/0x80 [ 31.261971] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.262520] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.263331] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.263840] kthread+0x257/0x310 [ 31.264485] ? __pfx_kthread+0x10/0x10 [ 31.264974] ret_from_fork+0x41/0x80 [ 31.265513] ? __pfx_kthread+0x10/0x10 [ 31.265977] ret_from_fork_asm+0x1a/0x30 [ 31.266348] </TASK> [ 31.266623] [ 31.266831] Allocated by task 264: [ 31.267192] kasan_save_stack+0x3d/0x60 [ 31.267611] kasan_save_track+0x18/0x40 [ 31.268193] kasan_save_alloc_info+0x3b/0x50 [ 31.268766] __kasan_kmalloc+0xb7/0xc0 [ 31.269246] __kmalloc_cache_noprof+0x184/0x410 [ 31.269852] kasan_memcmp+0xb8/0x390 [ 31.270563] kunit_try_run_case+0x1b3/0x490 [ 31.270950] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.271730] kthread+0x257/0x310 [ 31.272263] ret_from_fork+0x41/0x80 [ 31.272629] ret_from_fork_asm+0x1a/0x30 [ 31.273026] [ 31.273226] The buggy address belongs to the object at ffff8881029f3c00 [ 31.273226] which belongs to the cache kmalloc-32 of size 32 [ 31.274960] The buggy address is located 0 bytes to the right of [ 31.274960] allocated 24-byte region [ffff8881029f3c00, ffff8881029f3c18) [ 31.277349] [ 31.277505] The buggy address belongs to the physical page: [ 31.278199] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029f3 [ 31.279434] flags: 0x200000000000000(node=0|zone=2) [ 31.279829] page_type: f5(slab) [ 31.280323] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 31.281068] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 31.282239] page dumped because: kasan: bad access detected [ 31.283040] [ 31.283187] Memory state around the buggy address: [ 31.283982] ffff8881029f3b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.284549] ffff8881029f3b80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.285660] >ffff8881029f3c00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.286510] ^ [ 31.287075] ffff8881029f3c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.288350] ffff8881029f3d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.289011] ==================================================================