loop_set_block_size: loop0 () has still dirty pages (nrpages=1) loop_set_block_size: loop0 () has still dirty pages (nrpages=2) loop_set_block_size: loop0 () has still dirty pages (nrpages=1) ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:376 [inline] BUG: KASAN: slab-out-of-bounds in memcpy_from_page+0x8c/0x110 lib/iov_iter.c:454 Read of size 2048 at addr ffff8880a334d540 by task loop0/8343 CPU: 1 PID: 8343 Comm: loop0 Not tainted 4.14.303-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report+0x6f/0x80 mm/kasan/report.c:409 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:376 [inline] memcpy_from_page+0x8c/0x110 lib/iov_iter.c:454 iov_iter_copy_from_user_atomic+0x5dc/0xa20 lib/iov_iter.c:801 generic_perform_write+0x22b/0x430 mm/filemap.c:3063 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3180 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3208 call_write_iter include/linux/fs.h:1780 [inline] do_iter_readv_writev+0x4cf/0x5f0 fs/read_write.c:675 do_iter_write+0x152/0x550 fs/read_write.c:954 vfs_iter_write+0x70/0xa0 fs/read_write.c:967 lo_write_bvec+0x114/0x310 drivers/block/loop.c:272 lo_write_simple drivers/block/loop.c:294 [inline] do_req_filebacked drivers/block/loop.c:587 [inline] loop_handle_cmd drivers/block/loop.c:1784 [inline] loop_queue_work+0x9f2/0x21e0 drivers/block/loop.c:1798 kthread_worker_fn+0x271/0x6c0 kernel/kthread.c:667 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 Allocated by task 8342: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] hfsplus_read_wrapper+0x281/0xd70 fs/hfsplus/wrapper.c:177 hfsplus_fill_super+0x331/0x1850 fs/hfsplus/super.c:413 mount_bdev+0x2b3/0x360 fs/super.c:1134 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2572 [inline] do_mount+0xe65/0x2a30 fs/namespace.c:2905 SYSC_mount fs/namespace.c:3121 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3098 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 7930: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb+0x46/0x60 net/core/skbuff.c:654 sk_eat_skb include/net/sock.h:2358 [inline] tcp_recvmsg+0x14fc/0x1d50 net/ipv4/tcp.c:1994 inet_recvmsg+0xef/0x4d0 net/ipv4/af_inet.c:793 sock_recvmsg_nosec net/socket.c:819 [inline] sock_recvmsg net/socket.c:826 [inline] sock_recvmsg net/socket.c:822 [inline] sock_read_iter+0x2be/0x3f0 net/socket.c:903 call_read_iter include/linux/fs.h:1774 [inline] new_sync_read fs/read_write.c:401 [inline] __vfs_read+0x449/0x620 fs/read_write.c:413 vfs_read+0x139/0x340 fs/read_write.c:447 SYSC_read fs/read_write.c:574 [inline] SyS_read+0xf2/0x210 fs/read_write.c:567 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880a334d540 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8880a334d540, ffff8880a334d740) The buggy address belongs to the page: page:ffffea00028cd340 count:1 mapcount:0 mapping:ffff8880a334d040 index:0xffff8880a334d040 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a334d040 ffff8880a334d040 0000000100000003 raw: ffffea0002a4f360 ffffea00025c8da0 ffff88813fe74940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a334d600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a334d680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a334d700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8880a334d780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a334d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================