loop0: detected capacity change from 0 to 71 ntfs: (device loop0): is_boot_sector_ntfs(): Invalid end of sector marker. ================================================================== BUG: KASAN: use-after-free in ntfs_attr_find+0x91a/0xd80 fs/ntfs/attrib.c:597 Read of size 2 at addr ffff888075f890aa by task syz-executor242/3602 CPU: 0 PID: 3602 Comm: syz-executor242 Not tainted 6.0.0-rc6-syzkaller-00291-g3db61221f4e8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 ntfs_attr_find+0x91a/0xd80 fs/ntfs/attrib.c:597 ntfs_attr_lookup+0x4c3/0x2370 ntfs_read_inode_mount+0x8c9/0x2680 fs/ntfs/inode.c:1845 ntfs_fill_super+0x187a/0x2bf0 fs/ntfs/super.c:2854 mount_bdev+0x26c/0x3a0 fs/super.c:1400 legacy_get_tree+0xea/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fc31d3ea2ea Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe4c51ba48 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffe4c51baa0 RCX: 00007fc31d3ea2ea RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe4c51ba60 RBP: 00007ffe4c51ba60 R08: 00007ffe4c51baa0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000290 R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000006 Allocated by task 3601: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xcd/0x100 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] __kmalloc_node_track_caller+0x265/0x400 mm/slub.c:4969 kmalloc_reserve net/core/skbuff.c:362 [inline] __alloc_skb+0x112/0x2b0 net/core/skbuff.c:434 alloc_skb_fclone include/linux/skbuff.h:1307 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:861 tcp_sendmsg_locked+0xd70/0x40c0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2187 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:578 ksys_write+0x177/0x2a0 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 3601: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:45 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1759 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1785 slab_free mm/slub.c:3539 [inline] kfree+0xda/0x210 mm/slub.c:4567 skb_free_head net/core/skbuff.c:662 [inline] skb_release_data+0x586/0x790 net/core/skbuff.c:691 skb_release_all net/core/skbuff.c:756 [inline] __kfree_skb+0x56/0x1d0 net/core/skbuff.c:770 tcp_clean_rtx_queue+0x97c/0x2be0 net/ipv4/tcp_input.c:3333 tcp_ack+0x1a48/0x3e50 net/ipv4/tcp_input.c:3882 tcp_rcv_established+0x7d1/0x1a10 net/ipv4/tcp_input.c:5993 tcp_v4_do_rcv+0x479/0xac0 net/ipv4/tcp_ipv4.c:1661 tcp_v4_rcv+0x23e0/0x2c80 net/ipv4/tcp_ipv4.c:2078 ip_protocol_deliver_rcu+0x38d/0x750 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x269/0x480 net/ipv4/ip_input.c:233 dst_input include/net/dst.h:461 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:575 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:625 [inline] ip_sublist_rcv+0xa8b/0xb70 net/ipv4/ip_input.c:633 ip_list_rcv+0x443/0x490 net/ipv4/ip_input.c:668 __netif_receive_skb_list_ptype net/core/dev.c:5528 [inline] __netif_receive_skb_list_core+0x71e/0x930 net/core/dev.c:5576 __netif_receive_skb_list+0x4a1/0x570 net/core/dev.c:5628 netif_receive_skb_list_internal+0x528/0x820 net/core/dev.c:5719 gro_normal_list include/net/gro.h:430 [inline] napi_complete_done+0x34d/0x7f0 net/core/dev.c:6060 virtqueue_napi_complete drivers/net/virtio_net.c:398 [inline] virtnet_poll+0xc03/0x1280 drivers/net/virtio_net.c:1675 __napi_poll+0xbe/0x4b0 net/core/dev.c:6511 napi_poll net/core/dev.c:6578 [inline] net_rx_action+0x75c/0x1080 net/core/dev.c:6689 __do_softirq+0x362/0x773 kernel/softirq.c:571 The buggy address belongs to the object at ffff888075f89000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 170 bytes inside of 1024-byte region [ffff888075f89000, ffff888075f89400) The buggy address belongs to the physical page: page:ffffea0001d7e200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75f88 head:ffffea0001d7e200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888012041dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3601, tgid 3601 (sshd), ts 49847600136, free_ts 49807687157 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5515 alloc_slab_page+0x70/0xf0 mm/slub.c:1829 allocate_slab+0x5e/0x520 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x3ee/0xc40 mm/slub.c:3036 __slab_alloc mm/slub.c:3123 [inline] slab_alloc_node mm/slub.c:3214 [inline] __kmalloc_node+0x2cd/0x420 mm/slub.c:4473 kmalloc_node include/linux/slab.h:623 [inline] kvmalloc_node+0x6e/0x160 mm/util.c:613 kvmalloc include/linux/slab.h:750 [inline] kvmalloc_array include/linux/slab.h:768 [inline] bpf_int_jit_compile+0x542/0xbc40 arch/x86/net/bpf_jit_comp.c:2365 bpf_prog_select_runtime+0x853/0xb60 kernel/bpf/core.c:2182 bpf_migrate_filter net/core/filter.c:1296 [inline] bpf_prepare_filter+0x10ba/0x1380 net/core/filter.c:1344 bpf_prog_create_from_user+0x2a1/0x3d0 net/core/filter.c:1438 seccomp_prepare_filter kernel/seccomp.c:671 [inline] seccomp_prepare_user_filter kernel/seccomp.c:708 [inline] seccomp_set_mode_filter kernel/seccomp.c:1871 [inline] do_seccomp+0x826/0xf20 kernel/seccomp.c:1991 __do_sys_prctl+0x5e9/0x12a0 kernel/sys.c:2430 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3476 page_to_skb+0x661/0xb80 drivers/net/virtio_net.c:551 receive_mergeable+0x353/0x26b0 drivers/net/virtio_net.c:1119 receive_buf+0x15c/0x1c50 drivers/net/virtio_net.c:1258 virtnet_receive drivers/net/virtio_net.c:1553 [inline] virtnet_poll+0x64b/0x1280 drivers/net/virtio_net.c:1671 __napi_poll+0xbe/0x4b0 net/core/dev.c:6511 napi_poll net/core/dev.c:6578 [inline] net_rx_action+0x75c/0x1080 net/core/dev.c:6689 __do_softirq+0x362/0x773 kernel/softirq.c:571 Memory state around the buggy address: ffff888075f88f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888075f89000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888075f89080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888075f89100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888075f89180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================