================================================================== BUG: KASAN: slab-out-of-bounds in __cpa_addr arch/x86/mm/pat/set_memory.c:309 [inline] BUG: KASAN: slab-out-of-bounds in cpa_flush arch/x86/mm/pat/set_memory.c:449 [inline] BUG: KASAN: slab-out-of-bounds in change_page_attr_set_clr+0x625/0xfc0 arch/x86/mm/pat/set_memory.c:2115 Read of size 8 at addr ffff888057a77520 by task syz.3.4299/22154 CPU: 0 UID: 0 PID: 22154 Comm: syz.3.4299 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 __cpa_addr arch/x86/mm/pat/set_memory.c:309 [inline] cpa_flush arch/x86/mm/pat/set_memory.c:449 [inline] change_page_attr_set_clr+0x625/0xfc0 arch/x86/mm/pat/set_memory.c:2115 cpa_set_pages_array arch/x86/mm/pat/set_memory.c:2137 [inline] _set_pages_array+0x145/0x270 arch/x86/mm/pat/set_memory.c:2521 drm_gem_shmem_get_pages_locked+0x2d0/0x440 drivers/gpu/drm/drm_gem_shmem_helper.c:214 drm_gem_shmem_mmap+0x193/0x460 drivers/gpu/drm/drm_gem_shmem_helper.c:646 drm_gem_mmap_obj+0x187/0x4e0 drivers/gpu/drm/drm_gem.c:1167 drm_gem_mmap+0x384/0x640 drivers/gpu/drm/drm_gem.c:1245 vfs_mmap include/linux/fs.h:2281 [inline] mmap_file mm/internal.h:167 [inline] __mmap_new_file_vma mm/vma.c:2413 [inline] __mmap_new_vma mm/vma.c:2476 [inline] __mmap_region mm/vma.c:2669 [inline] mmap_region+0x18a5/0x2100 mm/vma.c:2739 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f20ea58ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f20e87d5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f20ea7c6180 RCX: 00007f20ea58ebe9 RDX: 0000000000000004 RSI: 0000000000004000 RDI: 0000200000001000 RBP: 00007f20ea611e19 R08: 0000000000000005 R09: 0000000100000000 R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f20ea7c6218 R14: 00007f20ea7c6180 R15: 00007ffe1fccc028 Allocated by task 22154: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:397 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:5366 [inline] __kvmalloc_node_noprof+0x5cd/0x910 mm/slub.c:6527 kvmalloc_array_node_noprof include/linux/slab.h:1118 [inline] drm_gem_get_pages+0x166/0xa20 drivers/gpu/drm/drm_gem.c:647 drm_gem_shmem_get_pages_locked+0x201/0x440 drivers/gpu/drm/drm_gem_shmem_helper.c:200 drm_gem_shmem_mmap+0x193/0x460 drivers/gpu/drm/drm_gem_shmem_helper.c:646 drm_gem_mmap_obj+0x187/0x4e0 drivers/gpu/drm/drm_gem.c:1167 drm_gem_mmap+0x384/0x640 drivers/gpu/drm/drm_gem.c:1245 vfs_mmap include/linux/fs.h:2281 [inline] mmap_file mm/internal.h:167 [inline] __mmap_new_file_vma mm/vma.c:2413 [inline] __mmap_new_vma mm/vma.c:2476 [inline] __mmap_region mm/vma.c:2669 [inline] mmap_region+0x18a5/0x2100 mm/vma.c:2739 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888057a77400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes to the right of allocated 288-byte region [ffff888057a77400, ffff888057a77520) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57a74 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a841c80 ffffea0001785700 dead000000000003 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a841c80 ffffea0001785700 dead000000000003 head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00015e9d01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5861, tgid 5861 (syz-executor), ts 74621216703, free_ts 21702179353 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3863 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5153 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2996 [inline] allocate_slab+0x8a/0x330 mm/slub.c:3164 new_slab mm/slub.c:3218 [inline] ___slab_alloc+0xbd1/0x13f0 mm/slub.c:4420 __slab_alloc+0x55/0xa0 mm/slub.c:4511 __slab_alloc_node mm/slub.c:4586 [inline] slab_alloc_node mm/slub.c:4996 [inline] __do_kmalloc_node mm/slub.c:5365 [inline] __kmalloc_noprof+0x471/0x7f0 mm/slub.c:5378 kmalloc_noprof include/linux/slab.h:960 [inline] kzalloc_noprof include/linux/slab.h:1090 [inline] fib6_info_alloc+0x30/0xf0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x142/0x860 net/ipv6/route.c:3810 ip6_route_add+0x49/0x1b0 net/ipv6/route.c:3939 addrconf_prefix_route net/ipv6/addrconf.c:2488 [inline] add_v4_addrs+0x8b3/0xbd0 net/ipv6/addrconf.c:3265 addrconf_gre_config net/ipv6/addrconf.c:3545 [inline] addrconf_init_auto_addrs+0x6da/0xa30 net/ipv6/addrconf.c:3559 addrconf_notify+0xacc/0x1010 net/ipv6/addrconf.c:3740 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 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:1394 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2900 __free_pages mm/page_alloc.c:5265 [inline] free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7111 destroy_args+0x69/0x660 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x39f/0x3b0 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x233/0x820 init/main.c:1281 do_initcall_level+0x104/0x190 init/main.c:1343 do_initcalls+0x59/0xa0 init/main.c:1359 kernel_init_freeable+0x334/0x4b0 init/main.c:1591 kernel_init+0x1d/0x1d0 init/main.c:1481 ret_from_fork+0x47c/0x820 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888057a77400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057a77480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888057a77500: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888057a77580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888057a77600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================