hfsplus: unable to find HFS+ superblock hfsplus: unable to find HFS+ superblock hfsplus: unable to find HFS+ superblock hfsplus: unable to find HFS+ superblock ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:345 [inline] BUG: KASAN: slab-out-of-bounds in memcpy_from_page+0x73/0xe0 lib/iov_iter.c:453 Read of size 2048 at addr ffff8801efbac780 by task loop0/5139 CPU: 1 PID: 5139 Comm: loop0 Not tainted 4.19.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 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+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:345 [inline] memcpy_from_page+0x73/0xe0 lib/iov_iter.c:453 iov_iter_copy_from_user_atomic+0x478/0x980 lib/iov_iter.c:916 generic_perform_write+0x291/0x470 mm/filemap.c:3147 __generic_file_write_iter+0x205/0x590 mm/filemap.c:3264 generic_file_write_iter+0x302/0x660 mm/filemap.c:3292 call_write_iter include/linux/fs.h:1808 [inline] do_iter_readv_writev+0x4ae/0x960 fs/read_write.c:680 do_iter_write fs/read_write.c:959 [inline] do_iter_write+0x12a/0x510 fs/read_write.c:940 vfs_iter_write+0x5b/0xb0 fs/read_write.c:972 lo_write_bvec+0x127/0x310 drivers/block/loop.c:274 lo_write_simple drivers/block/loop.c:296 [inline] do_req_filebacked drivers/block/loop.c:608 [inline] loop_handle_cmd drivers/block/loop.c:1786 [inline] loop_queue_work+0xac5/0x1ffb drivers/block/loop.c:1800 kthread_worker_fn+0x1ff/0x640 kernel/kthread.c:662 loop_kthread_worker_fn+0x4c/0x60 drivers/block/loop.c:890 kthread+0x2ef/0x3a0 kernel/kthread.c:246 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:413 Allocated by task 5137: 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] hfsplus_read_wrapper+0xa1b/0xee0 fs/hfsplus/wrapper.c:177 hfsplus_fill_super+0x2e4/0x1770 fs/hfsplus/super.c:413 mount_bdev+0x26f/0x330 fs/super.c:1158 hfsplus_mount+0x10/0x20 fs/hfsplus/super.c:648 mount_fs+0x7f/0x1f0 fs/super.c:1261 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2457 [inline] do_mount+0x376/0x26e0 fs/namespace.c:2787 ksys_mount+0xb1/0xd0 fs/namespace.c:3003 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3014 do_syscall_64+0xca/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 2622: 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/0x270 mm/slub.c:3906 skb_free_head+0x74/0x90 net/core/skbuff.c:550 skb_release_data+0x4cf/0x670 net/core/skbuff.c:570 skb_release_all+0x3d/0x50 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0xaf/0x1d0 net/core/skbuff.c:701 netlink_broadcast_filtered+0x288/0x900 net/netlink/af_netlink.c:1519 netlink_broadcast+0xe/0x10 net/netlink/af_netlink.c:1541 nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x107/0x140 net/netlink/af_netlink.c:2497 rtnl_notify+0x86/0xe0 net/core/rtnetlink.c:736 rtmsg_ifa+0x11e/0x190 net/ipv4/devinet.c:1725 __inet_insert_ifa+0x5e0/0xb30 net/ipv4/devinet.c:518 inet_rtm_newaddr+0xb7f/0x13c0 net/ipv4/devinet.c:910 rtnetlink_rcv_msg+0x676/0x9d0 net/core/rtnetlink.c:4730 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4748 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x43d/0x650 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x680/0xc00 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:626 __sys_sendto+0x1d8/0x2a0 net/socket.c:1788 __do_sys_sendto net/socket.c:1800 [inline] __se_sys_sendto net/socket.c:1796 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1796 do_syscall_64+0xca/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8801efbac780 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8801efbac780, ffff8801efbac980) The buggy address belongs to the page: page:ffffea0007beeb00 count:1 mapcount:0 mapping:ffff8801f6802c00 index:0x0 compound_mapcount: 0 flags: 0x100000000008100(slab|head) raw: 0100000000008100 dead000000000100 dead000000000200 ffff8801f6802c00 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page allocated via order 1, migratetype Unmovable, gfp_mask 0x152c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC) 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+0x2bf3/0x4050 mm/page_alloc.c:3345 __alloc_pages_nodemask+0x390/0x2300 mm/page_alloc.c:4370 __alloc_pages include/linux/gfp.h:473 [inline] alloc_page_interleave+0x14/0x130 mm/mempolicy.c:1974 alloc_pages_current+0x1ef/0x290 mm/mempolicy.c:2091 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+0x44b/0x7b0 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] kmem_cache_alloc_node_trace+0xb6/0x240 mm/slub.c:2756 kmalloc_node include/linux/slab.h:551 [inline] kzalloc_node include/linux/slab.h:718 [inline] iolatency_pd_alloc+0x4c/0xe0 block/blk-iolatency.c:858 blkcg_activate_policy block/blk-cgroup.c:1405 [inline] blkcg_activate_policy+0xcb/0x510 block/blk-cgroup.c:1389 blk_iolatency_init+0x11e/0x280 block/blk-iolatency.c:712 blkcg_init_queue+0x160/0x290 block/blk-cgroup.c:1240 blk_alloc_queue_node+0x726/0xab0 block/blk-core.c:1077 blk_mq_init_queue+0x3e/0x90 block/blk-mq.c:2483 loop_add+0x274/0x800 drivers/block/loop.c:1856 loop_init+0x174/0x1c5 drivers/block/loop.c:2122 Memory state around the buggy address: ffff8801efbac880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801efbac900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801efbac980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801efbaca00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801efbaca80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================