================================================================== BUG: KASAN: slab-out-of-bounds in __swab64p include/uapi/linux/swab.h:202 [inline] BUG: KASAN: slab-out-of-bounds in __be64_to_cpup include/uapi/linux/byteorder/little_endian.h:75 [inline] BUG: KASAN: slab-out-of-bounds in cachefiles_set_object_xattr+0x713/0x7a0 fs/cachefiles/xattr.c:88 Read of size 8 at addr ffff88802d970552 by task kworker/u33:3/63 CPU: 0 UID: 0 PID: 63 Comm: kworker/u33:3 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 Workqueue: fscache fscache_cookie_worker 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 __swab64p include/uapi/linux/swab.h:202 [inline] __be64_to_cpup include/uapi/linux/byteorder/little_endian.h:75 [inline] cachefiles_set_object_xattr+0x713/0x7a0 fs/cachefiles/xattr.c:88 cachefiles_commit_object fs/cachefiles/interface.c:313 [inline] cachefiles_clean_up_object fs/cachefiles/interface.c:338 [inline] cachefiles_withdraw_cookie+0x8f4/0xc50 fs/cachefiles/interface.c:373 fscache_cookie_state_machine fs/netfs/fscache_cookie.c:780 [inline] fscache_cookie_worker+0x54f/0x1270 fs/netfs/fscache_cookie.c:835 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 63: 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:5414 [inline] __kmalloc_noprof+0x32f/0x840 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] cachefiles_set_object_xattr+0xef/0x7a0 fs/cachefiles/xattr.c:53 cachefiles_commit_object fs/cachefiles/interface.c:313 [inline] cachefiles_clean_up_object fs/cachefiles/interface.c:338 [inline] cachefiles_withdraw_cookie+0x8f4/0xc50 fs/cachefiles/interface.c:373 fscache_cookie_state_machine fs/netfs/fscache_cookie.c:780 [inline] fscache_cookie_worker+0x54f/0x1270 fs/netfs/fscache_cookie.c:835 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 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 ffff88802d970540 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 18 bytes inside of allocated 22-byte region [ffff88802d970540, ffff88802d970556) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2d970 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c042780 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000400040 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5144, tgid 5144 (udevd), ts 14021915346 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x4f4/0x6d0 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] proc_thread_self_get_link+0x1a6/0x210 fs/proc/thread_self.c:22 pick_link+0xac2/0x13c0 fs/namei.c:2064 step_into_slowpath+0x9ba/0xf90 fs/namei.c:2127 step_into fs/namei.c:2152 [inline] walk_component fs/namei.c:2288 [inline] link_path_walk+0xf28/0x1cc0 fs/namei.c:2656 path_openat+0x1ac/0x2440 fs/namei.c:4996 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 page last free pid 24 tgid 24 ts 14003802122 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 __pagetable_free include/linux/mm.h:3804 [inline] pagetable_free include/linux/mm.h:3828 [inline] pagetable_dtor_free include/linux/mm.h:3927 [inline] __tlb_remove_table include/asm-generic/tlb.h:221 [inline] __tlb_remove_table_free mm/mmu_gather.c:228 [inline] tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:291 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 run_ksoftirqd kernel/softirq.c:1108 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1100 smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 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: ffff88802d970400: 00 00 00 00 fc fc fc fc 00 00 00 fc fc fc fc fc ffff88802d970480: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc >ffff88802d970500: 00 00 00 00 fc fc fc fc 00 00 06 fc fc fc fc fc ^ ffff88802d970580: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff88802d970600: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================