loop_set_block_size: loop5 () has still dirty pages (nrpages=2) loop_set_block_size: loop5 () 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 ffff8880ab132080 by task loop5/8754 CPU: 0 PID: 8754 Comm: loop5 Not tainted 4.14.300-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 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 8745: 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 4631: 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 net/core/skbuff.c:654 [inline] consume_skb+0xe0/0x380 net/core/skbuff.c:714 skb_free_datagram+0x16/0xe0 net/core/datagram.c:331 unix_dgram_recvmsg+0x67e/0xc60 net/unix/af_unix.c:2225 sock_recvmsg_nosec net/socket.c:819 [inline] sock_recvmsg net/socket.c:826 [inline] sock_recvmsg+0xc0/0x100 net/socket.c:822 ___sys_recvmsg+0x20b/0x4d0 net/socket.c:2221 __sys_recvmsg+0xa0/0x120 net/socket.c:2266 SYSC_recvmsg net/socket.c:2278 [inline] SyS_recvmsg+0x27/0x40 net/socket.c:2273 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 ffff8880ab132080 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8880ab132080, ffff8880ab132280) The buggy address belongs to the page: page:ffffea0002ac4c80 count:1 mapcount:0 mapping:ffff8880ab132080 index:0xffff8880ab132d00 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880ab132080 ffff8880ab132d00 0000000100000004 raw: ffffea0002c0efa0 ffffea0002bd6ee0 ffff88813fe74940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ab132180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880ab132200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880ab132280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880ab132300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880ab132380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================