================================================================== BUG: KASAN: use-after-free in user_mode arch/x86/include/asm/ptrace.h:131 [inline] BUG: KASAN: use-after-free in trace_page_fault_entries arch/x86/mm/fault.c:1516 [inline] BUG: KASAN: use-after-free in do_page_fault+0x6d/0x320 arch/x86/mm/fault.c:1528 Read of size 8 at addr ffff8881eef9fe40 by task syz-executor468/410 CPU: 0 PID: 410 Comm: syz-executor468 Not tainted 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: The buggy address belongs to the page: page:ffffea0007bbe7c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea0007bbe208 ffffea0007bbe788 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4894 alloc_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] __kmalloc+0x176/0x2f0 mm/slub.c:3909 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:690 [inline] scsi_alloc_sdev+0x100/0x9d0 drivers/scsi/scsi_scan.c:222 scsi_probe_and_add_lun+0x193/0x3920 drivers/scsi/scsi_scan.c:1079 __scsi_scan_target+0x1d6/0xbc0 drivers/scsi/scsi_scan.c:1562 scsi_scan_channel drivers/scsi/scsi_scan.c:1650 [inline] scsi_scan_host_selected+0x343/0x5f0 drivers/scsi/scsi_scan.c:1679 do_scsi_scan_host drivers/scsi/scsi_scan.c:1818 [inline] scsi_scan_host+0x3bf/0x680 drivers/scsi/scsi_scan.c:1848 virtscsi_probe+0x7b5/0x930 drivers/scsi/virtio_scsi.c:905 virtio_dev_probe+0x8c0/0xb10 drivers/virtio/virtio.c:258 really_probe+0x507/0xd20 drivers/base/dd.c:567 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x7e4/0x910 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4956 [inline] __free_pages+0x8c/0x110 mm/page_alloc.c:4962 __free_slab+0x218/0x2d0 mm/slub.c:1774 free_slab mm/slub.c:1789 [inline] discard_slab+0x29/0x40 mm/slub.c:1795 __slab_free+0x374/0x380 mm/slub.c:3012 do_slab_free mm/slub.c:3068 [inline] ___cache_free+0xbb/0xd0 mm/slub.c:3087 qlink_free+0x23/0x30 mm/kasan/quarantine.c:148 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:167 quarantine_reduce+0x1a8/0x200 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x42/0x200 mm/kasan/common.c:507 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct+0x57/0x640 kernel/fork.c:882 copy_process+0x503/0x2cf0 kernel/fork.c:1889 _do_fork+0x190/0x860 kernel/fork.c:2399 __do_sys_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x12e/0x160 kernel/fork.c:2538 Memory state around the buggy address: ffff8881eef9fd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881eef9fd80: ff ff ff ff 00 00 00 00 00 00 00 00 ff ff ff ff >ffff8881eef9fe00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881eef9fe80: ff ff ff ff f1 f1 f1 f1 00 f2 f2 f2 04 f3 f3 f3 ffff8881eef9ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================