================================================================== BUG: KASAN: slab-out-of-bounds in reg_fixed_voltage_probe+0xb80/0xd10 drivers/regulator/fixed.c:275 Read of size 4 at addr ffff888020b3ff34 by task syz.3.13/5919 CPU: 1 UID: 0 PID: 5919 Comm: syz.3.13 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 reg_fixed_voltage_probe+0xb80/0xd10 drivers/regulator/fixed.c:275 platform_probe+0x106/0x1d0 drivers/base/platform.c:1439 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 device_driver_attach+0xd1/0x220 drivers/base/dd.c:1203 bind_store+0xf4/0x190 drivers/base/bus.c:267 drv_attr_store+0x74/0xb0 drivers/base/bus.c:125 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf70befec Code: Unable to access opcode bytes at 0xf70befc2. RSP: 002b:00000000f54ad50c EFLAGS: 00000292 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000080000700 RDX: 000000000000000b RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5334 [inline] __kmalloc_node_track_caller_noprof+0x331/0x830 mm/slub.c:5471 kmemdup_noprof+0x29/0x60 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:715 [inline] platform_device_add_data+0x30/0xc0 drivers/base/platform.c:685 dummy_hcd_init+0x4fb/0xc00 drivers/usb/gadget/udc/dummy_hcd.c:2859 do_one_initcall+0x11d/0x700 init/main.c:1347 do_initcall_level init/main.c:1409 [inline] do_initcalls init/main.c:1425 [inline] do_basic_setup init/main.c:1445 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658 kernel_init+0x1f/0x1e0 init/main.c:1548 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888020b3ff20 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 12 bytes to the right of allocated 8-byte region [ffff888020b3ff20, ffff888020b3ff28) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20b3f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801bc42500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800800080 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 3241301947, free_ts 3074358179 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab mm/slub.c:3380 [inline] new_slab+0xa2/0x640 mm/slub.c:3426 refill_objects+0xe3/0x410 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_noprof+0x66d/0x820 mm/slub.c:5359 _kmalloc_noprof include/linux/slab.h:992 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] acpi_ns_internalize_name+0x161/0x2e0 drivers/acpi/acpica/nsutils.c:331 acpi_ns_get_node_unlocked+0x18c/0x500 drivers/acpi/acpica/nsutils.c:666 acpi_ns_get_node+0x6c/0xf0 drivers/acpi/acpica/nsutils.c:726 acpi_ns_evaluate+0xb01/0x1670 drivers/acpi/acpica/nseval.c:62 acpi_ut_evaluate_object+0xf7/0x610 drivers/acpi/acpica/uteval.c:60 acpi_ut_execute_power_methods+0x1f9/0x3c0 drivers/acpi/acpica/uteval.c:288 acpi_get_object_info+0xa43/0xbe0 drivers/acpi/acpica/nsxfname.c:366 acpi_set_pnp_ids drivers/acpi/scan.c:1404 [inline] acpi_init_device_object+0xb92/0x1a20 drivers/acpi/scan.c:1821 acpi_add_single_object+0xe8/0x1ab0 drivers/acpi/scan.c:1872 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_remove_cache+0x154/0x170 mm/kasan/quarantine.c:378 kmem_cache_shrink+0xd/0x20 mm/slab_common.c:604 acpi_os_purge_cache+0x15/0x20 drivers/acpi/osl.c:1622 acpi_purge_cached_objects+0x51/0x140 drivers/acpi/acpica/utxface.c:237 acpi_initialize_objects+0x8b/0x100 drivers/acpi/acpica/utxfinit.c:250 acpi_bus_init drivers/acpi/bus.c:1503 [inline] acpi_init+0x1b0/0x840 drivers/acpi/bus.c:1592 do_one_initcall+0x11d/0x700 init/main.c:1347 do_initcall_level init/main.c:1409 [inline] do_initcalls init/main.c:1425 [inline] do_basic_setup init/main.c:1445 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658 kernel_init+0x1f/0x1e0 init/main.c:1548 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888020b3fe00: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc ffff888020b3fe80: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc >ffff888020b3ff00: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc ^ ffff888020b3ff80: 05 fc fc fc 00 fc fc fc 07 fc fc fc 00 fc fc fc ffff888020b40000: 00 00 00 00 00 00 fc fc 00 00 00 00 00 00 fc fc ==================================================================