================================================================== 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+0x410/0x700 fs/cachefiles/xattr.c:89 Read of size 8 at addr ffff8880431010d2 by task kworker/u4:6/178 CPU: 0 UID: 0 PID: 178 Comm: kworker/u4:6 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_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 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+0x410/0x700 fs/cachefiles/xattr.c:89 cachefiles_commit_object fs/cachefiles/interface.c:319 [inline] cachefiles_clean_up_object fs/cachefiles/interface.c:344 [inline] cachefiles_withdraw_cookie+0x50a/0x8d0 fs/cachefiles/interface.c:381 fscache_cookie_state_machine fs/netfs/fscache_cookie.c:780 [inline] fscache_cookie_worker+0x38e/0x1160 fs/netfs/fscache_cookie.c:835 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 178: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5334 [inline] __kmalloc_noprof+0x375/0x720 mm/slub.c:5359 _kmalloc_noprof include/linux/slab.h:992 [inline] cachefiles_set_object_xattr+0xb7/0x700 fs/cachefiles/xattr.c:53 cachefiles_commit_object fs/cachefiles/interface.c:319 [inline] cachefiles_clean_up_object fs/cachefiles/interface.c:344 [inline] cachefiles_withdraw_cookie+0x50a/0x8d0 fs/cachefiles/interface.c:381 fscache_cookie_state_machine fs/netfs/fscache_cookie.c:780 [inline] fscache_cookie_worker+0x38e/0x1160 fs/netfs/fscache_cookie.c:835 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 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 ffff8880431010c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 18 bytes inside of allocated 22-byte region [ffff8880431010c0, ffff8880431010d6) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888043101700 pfn:0x43101 flags: 0x4fff00000000200(workingset|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000200 ffff88801b041780 ffffea0000d04450 ffffea0000d0c690 raw: ffff888043101700 000000080040003e 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5029, tgid 5029 (rm), ts 57877860607, free_ts 57877299750 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab+0x79/0x5e0 mm/slub.c:3380 new_slab mm/slub.c:3426 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x2bf/0x6b0 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] __kmalloc_cache_noprof+0x3a7/0x660 mm/slub.c:5485 _kmalloc_noprof include/linux/slab.h:988 [inline] slab_free_hook mm/slub.c:2629 [inline] slab_free mm/slub.c:6377 [inline] kmem_cache_free+0x156/0x650 mm/slub.c:6504 tear_down_vmas+0x312/0x520 mm/mmap.c:1262 exit_mmap+0x4ca/0x9f0 mm/mmap.c:1320 __mmput+0x118/0x420 kernel/fork.c:1187 exit_mm+0x221/0x2d0 kernel/exit.c:615 do_exit+0x6cd/0x2360 kernel/exit.c:997 do_group_exit+0x22d/0x2f0 kernel/exit.c:1152 __do_sys_exit_group kernel/exit.c:1163 [inline] __se_sys_exit_group kernel/exit.c:1161 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1161 x64_sys_call+0x221a/0x2240 arch/x86/include/generated/asm/syscalls_64.h:232 page last free pid 5029 tgid 5029 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950 tlb_batch_list_free mm/mmu_gather.c:161 [inline] tlb_finish_mmu+0x13e/0x220 mm/mmu_gather.c:552 exit_mmap+0x4b2/0x9f0 mm/mmap.c:1313 __mmput+0x118/0x420 kernel/fork.c:1187 exit_mm+0x221/0x2d0 kernel/exit.c:615 do_exit+0x6cd/0x2360 kernel/exit.c:997 do_group_exit+0x22d/0x2f0 kernel/exit.c:1152 __do_sys_exit_group kernel/exit.c:1163 [inline] __se_sys_exit_group kernel/exit.c:1161 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1161 x64_sys_call+0x221a/0x2240 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888043100f80: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ffff888043101000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc >ffff888043101080: fa fb fb fb fc fc fc fc 00 00 06 fc fc fc fc fc ^ ffff888043101100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc ffff888043101180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ==================================================================