================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x234/0x250 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff888020c0dee0 by task syz-executor.1/5512 CPU: 2 PID: 5512 Comm: syz-executor.1 Not tainted 6.9.0-rc5-syzkaller-00042-ge88c4cfcb7b8 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 hfsplus_bnode_read+0x234/0x250 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x2a2/0x3e0 fs/hfsplus/bnode.c:321 hfsplus_brec_remove+0x3e2/0x4f0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x2a2/0x3b0 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x27e/0x310 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x66e/0x2290 fs/hfsplus/xattr.c:342 hfsplus_setxattr+0x98/0xe0 fs/hfsplus/xattr.c:434 __vfs_setxattr+0x173/0x1e0 fs/xattr.c:200 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:234 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:295 vfs_setxattr+0x146/0x350 fs/xattr.c:321 do_setxattr+0x146/0x170 fs/xattr.c:629 setxattr+0x15d/0x180 fs/xattr.c:652 path_setxattr+0x179/0x1e0 fs/xattr.c:671 __do_sys_setxattr fs/xattr.c:687 [inline] __se_sys_setxattr fs/xattr.c:683 [inline] __ia32_sys_setxattr+0xc0/0x160 fs/xattr.c:683 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7338579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5f095ac EFLAGS: 00000292 ORIG_RAX: 00000000000000e2 RAX: ffffffffffffffda RBX: 0000000020000300 RCX: 0000000020000140 RDX: 00000000200002c0 RSI: 0000000000000700 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 5512: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc+0x1f9/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] __hfs_bnode_create+0x108/0x870 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x2c8/0xcb0 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b9/0x520 fs/hfsplus/bfind.c:183 hfsplus_find_attr+0xe6/0x250 fs/hfsplus/attributes.c:153 hfsplus_attr_exists+0x14d/0x200 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x4be/0x2290 fs/hfsplus/xattr.c:336 hfsplus_setxattr+0x98/0xe0 fs/hfsplus/xattr.c:434 __vfs_setxattr+0x173/0x1e0 fs/xattr.c:200 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:234 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:295 vfs_setxattr+0x146/0x350 fs/xattr.c:321 do_setxattr+0x146/0x170 fs/xattr.c:629 setxattr+0x15d/0x180 fs/xattr.c:652 path_setxattr+0x179/0x1e0 fs/xattr.c:671 __do_sys_setxattr fs/xattr.c:687 [inline] __se_sys_setxattr fs/xattr.c:683 [inline] __ia32_sys_setxattr+0xc0/0x160 fs/xattr.c:683 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888020c0de00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 72 bytes to the right of allocated 152-byte region [ffff888020c0de00, ffff888020c0de98) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20c0d flags: 0xfff80000000800(slab|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffffff() raw: 00fff80000000800 ffff888014c42a00 ffffea000081ed80 0000000000000006 raw: 0000000000000000 0000000000100010 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5480, tgid -505081982 (syz-executor.1), ts 5482, free_ts 68145770428 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317 __alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x670/0x16d0 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc_node+0x36e/0x480 mm/slub.c:3973 kmalloc_array_node include/linux/slab.h:726 [inline] kcalloc_node include/linux/slab.h:731 [inline] memcg_alloc_slab_cgroups+0xa9/0x180 mm/memcontrol.c:3015 __memcg_slab_post_alloc_hook+0xa3/0x370 mm/slub.c:1960 memcg_slab_post_alloc_hook mm/slub.c:1983 [inline] slab_post_alloc_hook mm/slub.c:3807 [inline] slab_alloc_node mm/slub.c:3845 [inline] kmem_cache_alloc_lru+0x397/0x6f0 mm/slub.c:3864 __d_alloc+0x35/0x8c0 fs/dcache.c:1624 d_alloc_pseudo+0x1c/0xc0 fs/dcache.c:1756 alloc_path_pseudo fs/file_table.c:330 [inline] alloc_file_pseudo+0xd2/0x200 fs/file_table.c:346 sock_alloc_file+0x50/0x1d0 net/socket.c:469 sock_map_fd net/socket.c:494 [inline] __sys_socket+0x1c2/0x260 net/socket.c:1715 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __ia32_sys_socket+0x72/0xb0 net/socket.c:1718 page last free pid 10 tgid 10 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2347 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2487 skb_free_frag include/linux/skbuff.h:3336 [inline] skb_free_head+0xa6/0x1e0 net/core/skbuff.c:1106 skb_release_data+0x76c/0x990 net/core/skbuff.c:1136 skb_release_all net/core/skbuff.c:1202 [inline] __kfree_skb+0x51/0x70 net/core/skbuff.c:1216 tcp_rcv_established+0xda9/0x21b0 net/ipv4/tcp_input.c:6080 tcp_v4_do_rcv+0x6a9/0xa50 net/ipv4/tcp_ipv4.c:1906 tcp_v4_rcv+0x338b/0x3b40 net/ipv4/tcp_ipv4.c:2332 ip_protocol_deliver_rcu+0xba/0x4e0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x316/0x570 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_local_deliver+0x18e/0x1f0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_sublist_rcv_finish+0x2c1/0x620 net/ipv4/ip_input.c:580 ip_list_rcv_finish.constprop.0+0x559/0x720 net/ipv4/ip_input.c:631 ip_sublist_rcv net/ipv4/ip_input.c:639 [inline] ip_list_rcv+0x339/0x450 net/ipv4/ip_input.c:674 __netif_receive_skb_list_ptype net/core/dev.c:5587 [inline] __netif_receive_skb_list_core+0x755/0x950 net/core/dev.c:5635 __netif_receive_skb_list net/core/dev.c:5687 [inline] netif_receive_skb_list_internal+0x753/0xda0 net/core/dev.c:5779 Memory state around the buggy address: ffff888020c0dd80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888020c0de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888020c0de80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888020c0df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888020c0df80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi