================================================================== 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+0x61a/0xe20 arch/x86/mm/pat/set_memory.c:2115 Read of size 8 at addr ffff88810df74ef8 by task syz.3.17/3565 CPU: 1 UID: 0 PID: 3565 Comm: syz.3.17 Not tainted syzkaller #0 PREEMPT(none) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0xf4/0x170 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+0x61a/0xe20 arch/x86/mm/pat/set_memory.c:2115 cpa_set_pages_array arch/x86/mm/pat/set_memory.c:2137 [inline] _set_pages_array+0xe3/0x1c0 arch/x86/mm/pat/set_memory.c:2521 drm_gem_shmem_get_pages_locked+0x20c/0x350 drivers/gpu/drm/drm_gem_shmem_helper.c:214 drm_gem_shmem_mmap+0x12b/0x360 drivers/gpu/drm/drm_gem_shmem_helper.c:646 drm_gem_mmap_obj+0x14d/0x380 drivers/gpu/drm/drm_gem.c:1139 drm_gem_mmap+0x30b/0x520 drivers/gpu/drm/drm_gem.c:1217 vfs_mmap include/linux/fs.h:2289 [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+0x14b1/0x1c50 mm/vma.c:2739 do_mmap+0x930/0xc30 mm/mmap.c:558 vm_mmap_pgoff+0x2a2/0x420 mm/util.c:580 ksys_mmap_pgoff+0x2be/0x3f0 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3d8169efc9 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:00007f3d81507038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f3d818f5fa0 RCX: 00007f3d8169efc9 RDX: 0000000000000004 RSI: 0000000000004000 RDI: 0000200000001000 RBP: 00007f3d81721f91 R08: 0000000000000003 R09: 0000000100000000 R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3d818f6038 R14: 00007f3d818f5fa0 R15: 00007ffddb583338 Allocated by task 3565: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4365 [inline] __kvmalloc_node_noprof+0x2e5/0x5c0 mm/slub.c:5052 kvmalloc_array_node_noprof include/linux/slab.h:1065 [inline] drm_gem_get_pages+0x12b/0x7b0 drivers/gpu/drm/drm_gem.c:640 drm_gem_shmem_get_pages_locked+0x14e/0x350 drivers/gpu/drm/drm_gem_shmem_helper.c:200 drm_gem_shmem_mmap+0x12b/0x360 drivers/gpu/drm/drm_gem_shmem_helper.c:646 drm_gem_mmap_obj+0x14d/0x380 drivers/gpu/drm/drm_gem.c:1139 drm_gem_mmap+0x30b/0x520 drivers/gpu/drm/drm_gem.c:1217 vfs_mmap include/linux/fs.h:2289 [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+0x14b1/0x1c50 mm/vma.c:2739 do_mmap+0x930/0xc30 mm/mmap.c:558 vm_mmap_pgoff+0x2a2/0x420 mm/util.c:580 ksys_mmap_pgoff+0x2be/0x3f0 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88810df74e00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of allocated 248-byte region [ffff88810df74e00, ffff88810df74ef8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10df74 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x100000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0100000000000040 ffff888100041b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 0100000000000040 ffff888100041b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 0100000000000001 ffffea000437dd01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 4901251468, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x168/0x1a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x3719/0x3870 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x26b/0x460 mm/page_alloc.c:5148 alloc_pages_mpol+0xcb/0x270 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x320 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0x9c6/0x10a0 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] __do_kmalloc_node mm/slub.c:4364 [inline] __kmalloc_node_track_caller_noprof+0x2e3/0x4f0 mm/slub.c:4384 __do_krealloc mm/slub.c:4942 [inline] krealloc_noprof+0x124/0x310 mm/slub.c:4995 add_sysfs_param+0xc4/0x8c0 kernel/params.c:654 kernel_add_sysfs_param+0x7f/0xe0 kernel/params.c:811 param_sysfs_builtin+0x18a/0x230 kernel/params.c:850 param_sysfs_builtin_init+0x23/0x30 kernel/params.c:986 do_one_initcall+0x197/0x4d0 init/main.c:1269 do_initcall_level+0x117/0x1d0 init/main.c:1331 do_initcalls+0x59/0xa0 init/main.c:1347 kernel_init_freeable+0x306/0x470 init/main.c:1579 page_owner free stack trace missing Memory state around the buggy address: ffff88810df74d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810df74e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88810df74e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ^ ffff88810df74f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810df74f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================