ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512) ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_list_ea fs/ntfs3/xattr.c:182 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x402/0x460 fs/ntfs3/xattr.c:710 Read of size 1 at addr ffff8880001af73d by task syz-executor.0/12240 CPU: 0 PID: 12240 Comm: syz-executor.0 Not tainted 6.1.0-rc8-syzkaller-00014-g8ed710da2873 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 ntfs_list_ea fs/ntfs3/xattr.c:182 [inline] ntfs_listxattr+0x402/0x460 fs/ntfs3/xattr.c:710 vfs_listxattr+0x109/0x190 fs/xattr.c:457 listxattr+0xf6/0x180 fs/xattr.c:804 path_listxattr+0xae/0x140 fs/xattr.c:828 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f43549 Code: 03 74 c0 01 10 05 03 74 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 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:00000000f7f3e5cc EFLAGS: 00000296 ORIG_RAX: 00000000000000e9 RAX: ffffffffffffffda RBX: 00000000200000c0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 12240: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] ntfs_read_ea+0x3e4/0x850 fs/ntfs3/xattr.c:110 ntfs_list_ea fs/ntfs3/xattr.c:168 [inline] ntfs_listxattr+0x16b/0x460 fs/ntfs3/xattr.c:710 vfs_listxattr+0x109/0x190 fs/xattr.c:457 listxattr+0xf6/0x180 fs/xattr.c:804 path_listxattr+0xae/0x140 fs/xattr.c:828 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:481 kvfree_call_rcu+0x78/0x8f0 kernel/rcu/tree.c:3343 sctp_bind_addr_clean+0x135/0x1f0 net/sctp/bind_addr.c:125 sctp_association_free+0x290/0x7d0 net/sctp/associola.c:358 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1328 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x33ff/0x5290 net/sctp/sm_sideeffect.c:1170 sctp_assoc_bh_rcv+0x38a/0x6c0 net/sctp/associola.c:1053 sctp_inq_push+0x1d6/0x270 net/sctp/inqueue.c:80 sctp_backlog_rcv+0x19a/0x5b0 net/sctp/input.c:346 sk_backlog_rcv include/net/sock.h:1109 [inline] __release_sock+0x133/0x3b0 net/core/sock.c:2906 release_sock+0x58/0x1b0 net/core/sock.c:3462 sctp_wait_for_connect+0x416/0x5c0 net/sctp/socket.c:9310 sctp_sendmsg_to_asoc+0x11d1/0x1a30 net/sctp/socket.c:1879 sctp_sendmsg+0xf05/0x1d90 net/sctp/socket.c:2025 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2565 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 The buggy address belongs to the object at ffff8880001af700 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff8880001af700, ffff8880001af740) The buggy address belongs to the physical page: page:ffffea0000006bc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1af flags: 0x7ff00000000200(slab|node=0|zone=0|lastcpupid=0x7ff) raw: 007ff00000000200 0000000000000000 dead000000000001 ffff888012042640 raw: 0000000000000000 0000000080200020 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 3741, tgid 3741 (syz-executor.3), ts 274968284414, free_ts 80830107475 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3180 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3279 slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x199/0x3e0 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0x4a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] kzalloc include/linux/slab.h:689 [inline] kobject_get_path+0xc2/0x230 lib/kobject.c:147 kobject_uevent_env+0x257/0x1620 lib/kobject_uevent.c:529 netdev_queue_add_kobject net/core/net-sysfs.c:1677 [inline] netdev_queue_update_kobjects+0x3d5/0x4f0 net/core/net-sysfs.c:1718 register_queue_kobjects net/core/net-sysfs.c:1779 [inline] netdev_register_kobject+0x334/0x400 net/core/net-sysfs.c:2019 register_netdevice+0xd99/0x1670 net/core/dev.c:10057 veth_newlink+0x33c/0x990 drivers/net/veth.c:1764 rtnl_newlink_create net/core/rtnetlink.c:3364 [inline] __rtnl_newlink+0x1087/0x17e0 net/core/rtnetlink.c:3581 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3594 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x184/0x210 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x66/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x304/0x410 mm/slub.c:3443 __alloc_skb+0x214/0x300 net/core/skbuff.c:497 alloc_skb_fclone include/linux/skbuff.h:1317 [inline] tcp_stream_alloc_skb+0x3c/0x580 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xc4f/0x2960 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1483 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 sock_write_iter+0x295/0x3d0 net/socket.c:1108 call_write_iter include/linux/fs.h:2199 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9ed/0xdd0 fs/read_write.c:584 ksys_write+0x1ec/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff8880001af600: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880001af680: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880001af700: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff8880001af780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880001af800: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi 4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d a: 10 06 adc %al,(%rsi) c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 10: 10 07 adc %al,(%rdi) 12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi 16: 10 08 adc %cl,(%rax) 18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1c: 00 00 add %al,(%rax) 1e: 00 00 add %al,(%rax) 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 retq 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 39: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi