Date
Nov. 22, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.049356] ================================================================== [ 32.050693] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320 [ 32.051606] Read of size 1 at addr fff00000c610527f by task kunit_try_catch/127 [ 32.052778] [ 32.053135] CPU: 0 UID: 0 PID: 127 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 32.055238] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.056065] Hardware name: linux,dummy-virt (DT) [ 32.057200] Call trace: [ 32.057978] show_stack+0x20/0x38 (C) [ 32.058508] dump_stack_lvl+0x8c/0xd0 [ 32.059017] print_report+0x118/0x5e0 [ 32.059613] kasan_report+0xc8/0x118 [ 32.060378] __asan_report_load1_noabort+0x20/0x30 [ 32.061960] kmalloc_oob_left+0x2ec/0x320 [ 32.062527] kunit_try_run_case+0x14c/0x3d0 [ 32.063234] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.064059] kthread+0x24c/0x2d0 [ 32.064725] ret_from_fork+0x10/0x20 [ 32.065323] [ 32.066545] Allocated by task 28: [ 32.066952] kasan_save_stack+0x3c/0x68 [ 32.067721] kasan_save_track+0x20/0x40 [ 32.068790] kasan_save_alloc_info+0x40/0x58 [ 32.069681] __kasan_kmalloc+0xd4/0xd8 [ 32.070678] __kmalloc_node_track_caller_noprof+0x184/0x4b8 [ 32.071760] kstrdup+0x54/0xc8 [ 32.072466] devtmpfs_work_loop+0x384/0x590 [ 32.073904] devtmpfsd+0x50/0x58 [ 32.074373] kthread+0x24c/0x2d0 [ 32.074840] ret_from_fork+0x10/0x20 [ 32.075610] [ 32.076087] Freed by task 28: [ 32.076967] kasan_save_stack+0x3c/0x68 [ 32.077715] kasan_save_track+0x20/0x40 [ 32.078622] kasan_save_free_info+0x4c/0x78 [ 32.079224] __kasan_slab_free+0x6c/0x98 [ 32.079922] kfree+0x114/0x3d0 [ 32.080336] devtmpfs_work_loop+0x498/0x590 [ 32.081157] devtmpfsd+0x50/0x58 [ 32.082122] kthread+0x24c/0x2d0 [ 32.082546] ret_from_fork+0x10/0x20 [ 32.083254] [ 32.083763] The buggy address belongs to the object at fff00000c6105260 [ 32.083763] which belongs to the cache kmalloc-16 of size 16 [ 32.085411] The buggy address is located 15 bytes to the right of [ 32.085411] allocated 16-byte region [fff00000c6105260, fff00000c6105270) [ 32.087148] [ 32.087697] The buggy address belongs to the physical page: [ 32.088539] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106105 [ 32.090532] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.091540] page_type: f5(slab) [ 32.092078] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 32.093823] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000 [ 32.095083] page dumped because: kasan: bad access detected [ 32.096111] [ 32.097144] Memory state around the buggy address: [ 32.098082] fff00000c6105100: fa fb fc fc fa fb fc fc 00 04 fc fc 00 04 fc fc [ 32.098936] fff00000c6105180: fa fb fc fc 00 05 fc fc 00 05 fc fc 00 00 fc fc [ 32.099929] >fff00000c6105200: 00 06 fc fc 00 06 fc fc 00 00 fc fc fa fb fc fc [ 32.101503] ^ [ 32.103273] fff00000c6105280: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.104264] fff00000c6105300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.105656] ==================================================================
[ 23.754147] ================================================================== [ 23.755698] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x363/0x3c0 [ 23.756973] Read of size 1 at addr ffff88810283465f by task kunit_try_catch/146 [ 23.757691] [ 23.757878] CPU: 1 UID: 0 PID: 146 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 23.758991] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.759530] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.760547] Call Trace: [ 23.761265] <TASK> [ 23.761693] dump_stack_lvl+0x73/0xb0 [ 23.762176] print_report+0xd1/0x640 [ 23.762652] ? __virt_addr_valid+0x1db/0x2d0 [ 23.763321] ? kasan_complete_mode_report_info+0x2a/0x200 [ 23.763775] kasan_report+0x102/0x140 [ 23.764169] ? kmalloc_oob_left+0x363/0x3c0 [ 23.765347] ? kmalloc_oob_left+0x363/0x3c0 [ 23.765752] __asan_report_load1_noabort+0x18/0x20 [ 23.766847] kmalloc_oob_left+0x363/0x3c0 [ 23.767187] ? __pfx_kmalloc_oob_left+0x10/0x10 [ 23.768214] ? __schedule+0xc3e/0x2790 [ 23.768609] ? __pfx_read_tsc+0x10/0x10 [ 23.769279] ? ktime_get_ts64+0x84/0x230 [ 23.769663] kunit_try_run_case+0x1b3/0x490 [ 23.770242] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.770661] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 23.771498] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.772106] ? __kthread_parkme+0x82/0x160 [ 23.773247] ? preempt_count_sub+0x50/0x80 [ 23.773638] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.774237] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.775094] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.775578] kthread+0x257/0x310 [ 23.775974] ? __pfx_kthread+0x10/0x10 [ 23.776319] ret_from_fork+0x41/0x80 [ 23.776811] ? __pfx_kthread+0x10/0x10 [ 23.778009] ret_from_fork_asm+0x1a/0x30 [ 23.778309] </TASK> [ 23.778622] [ 23.778801] Allocated by task 1: [ 23.779047] kasan_save_stack+0x3d/0x60 [ 23.779307] kasan_save_track+0x18/0x40 [ 23.779535] kasan_save_alloc_info+0x3b/0x50 [ 23.779777] __kasan_kmalloc+0xb7/0xc0 [ 23.780029] __kmalloc_node_track_caller_noprof+0x1c6/0x500 [ 23.780310] kvasprintf+0xc6/0x150 [ 23.780538] __kthread_create_on_node+0x18c/0x3a0 [ 23.780789] kthread_create_on_node+0xa8/0xe0 [ 23.782119] create_worker+0x3c8/0x7a0 [ 23.782840] alloc_unbound_pwq+0x8ea/0xdb0 [ 23.783464] apply_wqattrs_prepare+0x332/0xd40 [ 23.783757] apply_workqueue_attrs_locked+0x4d/0xa0 [ 23.785257] alloc_workqueue+0xcc4/0x1ad0 [ 23.785685] latency_fsnotify_init+0x1b/0x50 [ 23.786232] do_one_initcall+0xb5/0x370 [ 23.786671] kernel_init_freeable+0x425/0x6f0 [ 23.787217] kernel_init+0x23/0x1e0 [ 23.787688] ret_from_fork+0x41/0x80 [ 23.788051] ret_from_fork_asm+0x1a/0x30 [ 23.788659] [ 23.788857] The buggy address belongs to the object at ffff888102834640 [ 23.788857] which belongs to the cache kmalloc-16 of size 16 [ 23.789681] The buggy address is located 18 bytes to the right of [ 23.789681] allocated 13-byte region [ffff888102834640, ffff88810283464d) [ 23.790865] [ 23.791026] The buggy address belongs to the physical page: [ 23.791294] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102834 [ 23.791652] flags: 0x200000000000000(node=0|zone=2) [ 23.791964] page_type: f5(slab) [ 23.792412] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 23.793024] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000 [ 23.793866] page dumped because: kasan: bad access detected [ 23.794291] [ 23.794554] Memory state around the buggy address: [ 23.795007] ffff888102834500: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc [ 23.795720] ffff888102834580: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc [ 23.796366] >ffff888102834600: fa fb fc fc fa fb fc fc 00 05 fc fc 00 07 fc fc [ 23.796955] ^ [ 23.797697] ffff888102834680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.798535] ffff888102834700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.799132] ==================================================================