IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:345 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read+0x9b/0xd0 fs/hfs/bnode.c:26 Write of size 94 at addr ffff8801e11fb780 by task syz.3.15/3877 CPU: 0 PID: 3877 Comm: syz.3.15 Not tainted 4.19.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x10c/0x17a lib/dump_stack.c:113 print_address_description.cold.6+0x9/0x244 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x305 mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13c/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:345 [inline] hfs_bnode_read+0x9b/0xd0 fs/hfs/bnode.c:26 hfs_bnode_read_key+0x111/0x1b0 fs/hfs/bnode.c:58 hfs_brec_insert+0x687/0xbb0 fs/hfs/brec.c:159 hfs_cat_move+0x2fa/0x78d fs/hfs/catalog.c:320 hfs_rename+0xbb/0x1f0 fs/hfs/dir.c:298 vfs_rename+0xa18/0x1860 fs/namei.c:4477 do_renameat2+0x60d/0xa00 fs/namei.c:4627 __do_sys_renameat2 fs/namei.c:4662 [inline] __se_sys_renameat2 fs/namei.c:4659 [inline] __x64_sys_renameat2+0xb9/0x150 fs/namei.c:4659 do_syscall_64+0xd0/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7feaf11fb819 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:00007feaf0c7c038 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007feaf13b2fa0 RCX: 00007feaf11fb819 RDX: 0000000000000004 RSI: 0000000020000380 RDI: 0000000000000004 RBP: 00007feaf126e75e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000200 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007feaf13b2fa0 R15: 00007ffc3ad26278 Allocated by task 3877: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __kmalloc+0x139/0x260 mm/slub.c:3751 kmalloc include/linux/slab.h:518 [inline] hfs_find_init+0x96/0x180 fs/hfs/bfind.c:21 hfs_cat_move+0x10e/0x78d fs/hfs/catalog.c:293 hfs_rename+0xbb/0x1f0 fs/hfs/dir.c:298 vfs_rename+0xa18/0x1860 fs/namei.c:4477 do_renameat2+0x60d/0xa00 fs/namei.c:4627 __do_sys_renameat2 fs/namei.c:4662 [inline] __se_sys_renameat2 fs/namei.c:4659 [inline] __x64_sys_renameat2+0xb9/0x150 fs/namei.c:4659 do_syscall_64+0xd0/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 3204: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x167/0x240 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 slab_free_hook mm/slub.c:1371 [inline] slab_free_freelist_hook mm/slub.c:1398 [inline] slab_free mm/slub.c:2953 [inline] kfree+0x10c/0x280 mm/slub.c:3906 kzfree+0x28/0x30 mm/slab_common.c:1543 aa_free_file_ctx security/apparmor/include/file.h:76 [inline] apparmor_file_free_security+0x69/0x90 security/apparmor/lsm.c:448 security_file_free+0x40/0x70 security/security.c:889 file_free fs/file_table.c:54 [inline] __fput+0x2eb/0x740 fs/file_table.c:294 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x10e/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x170/0x1d0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x2bf/0x340 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8801e11fb780 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of 96-byte region [ffff8801e11fb780, ffff8801e11fb7e0) The buggy address belongs to the page: page:ffffea0007847ec0 count:1 mapcount:0 mapping:ffff8801f6c03400 index:0x0 flags: 0x100000000000100(slab) raw: 0100000000000100 ffffea0007832e80 0000001900000019 ffff8801f6c03400 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page allocated via order 0, migratetype Unmovable, gfp_mask 0x6012c0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:1906 [inline] prep_new_page mm/page_alloc.c:1914 [inline] get_page_from_freelist+0x2c01/0x4060 mm/page_alloc.c:3345 __alloc_pages_nodemask+0x390/0x2300 mm/page_alloc.c:4370 alloc_pages_current+0xfd/0x290 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:509 [inline] alloc_slab_page mm/slub.c:1438 [inline] allocate_slab mm/slub.c:1583 [inline] new_slab+0x458/0x7d0 mm/slub.c:1654 new_slab_objects mm/slub.c:2417 [inline] ___slab_alloc+0x600/0x890 mm/slub.c:2569 __slab_alloc+0x2f/0x60 mm/slub.c:2609 slab_alloc_node mm/slub.c:2672 [inline] slab_alloc mm/slub.c:2714 [inline] kmem_cache_alloc_trace+0x1d7/0x220 mm/slub.c:2731 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] aa_alloc_file_ctx security/apparmor/include/file.h:60 [inline] apparmor_file_alloc_security+0x310/0x5e0 security/apparmor/lsm.c:438 security_file_alloc+0x40/0x80 security/security.c:884 __alloc_file+0x7a/0x280 fs/file_table.c:105 alloc_empty_file+0x45/0x110 fs/file_table.c:150 path_openat+0x101/0x2910 fs/namei.c:3523 do_filp_open+0x177/0x250 fs/namei.c:3564 do_sys_open+0x1dc/0x350 fs/open.c:1063 __do_sys_openat fs/open.c:1090 [inline] __se_sys_openat fs/open.c:1084 [inline] __x64_sys_openat+0x98/0xf0 fs/open.c:1084 do_syscall_64+0xd0/0x340 arch/x86/entry/common.c:290 Memory state around the buggy address: ffff8801e11fb680: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801e11fb700: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801e11fb780: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff8801e11fb800: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801e11fb880: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================