================================================================== 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 ffff8880129666d2 by task kworker/u4:1/13 CPU: 0 UID: 0 PID: 13 Comm: kworker/u4:1 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:313 [inline] cachefiles_clean_up_object fs/cachefiles/interface.c:338 [inline] cachefiles_withdraw_cookie+0x50a/0x8d0 fs/cachefiles/interface.c:373 fscache_cookie_state_machine fs/netfs/fscache_cookie.c:780 [inline] fscache_cookie_worker+0x38e/0x1170 fs/netfs/fscache_cookie.c:835 process_one_work kernel/workqueue.c:3387 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551 kthread+0x38b/0x480 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 13: 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:5414 [inline] __kmalloc_noprof+0x36b/0x720 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] cachefiles_set_object_xattr+0xb7/0x700 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+0x50a/0x8d0 fs/cachefiles/interface.c:373 fscache_cookie_state_machine fs/netfs/fscache_cookie.c:780 [inline] fscache_cookie_worker+0x38e/0x1170 fs/netfs/fscache_cookie.c:835 process_one_work kernel/workqueue.c:3387 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551 kthread+0x38b/0x480 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 ffff8880129666c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 18 bytes inside of allocated 22-byte region [ffff8880129666c0, ffff8880129666d6) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880129664c0 pfn:0x12966 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801b041780 ffffea00006ffad0 ffffea00004b4b10 raw: ffff8880129664c0 0000000000400034 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 4681, tgid 4681 (S02acpid), ts 29761462351 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab+0x7d/0x620 mm/slub.c:3462 new_slab mm/slub.c:3513 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x39b/0x600 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] slab_free_hook mm/slub.c:2700 [inline] slab_free mm/slub.c:6499 [inline] kmem_cache_free+0x156/0x650 mm/slub.c:6626 __fput_deferred+0x2ae/0x390 fs/file_table.c:567 fput_close+0x11f/0x240 fs/file_table.c:629 path_openat+0x167b/0x1d60 fs/namei.c:5009 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 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+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 1 tgid 1 ts 28865848756 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962 free_reserved_page include/linux/mm.h:4083 [inline] __free_reserved_area mm/memblock.c:926 [inline] free_reserved_area+0x204/0x2e0 mm/memblock.c:957 free_init_pages arch/x86/mm/init.c:936 [inline] free_kernel_image_pages+0xa2/0x100 arch/x86/mm/init.c:952 kernel_init+0x36/0x1d0 init/main.c:1569 ret_from_fork+0x514/0xb70 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: ffff888012966580: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff888012966600: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc >ffff888012966680: 00 00 00 00 fc fc fc fc 00 00 06 fc fc fc fc fc ^ ffff888012966700: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff888012966780: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ==================================================================