loop_set_block_size: loop5 () has still dirty pages (nrpages=3) loop_set_block_size: loop5 () has still dirty pages (nrpages=2) ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in memcpy_from_page+0x8c/0x120 lib/iov_iter.c:453 Read of size 2048 at addr ffff88809cd41540 by task loop5/8413 CPU: 0 PID: 8413 Comm: loop5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:377 [inline] memcpy_from_page+0x8c/0x120 lib/iov_iter.c:453 iov_iter_copy_from_user_atomic+0x701/0xaa0 lib/iov_iter.c:929 generic_perform_write+0x265/0x4d0 mm/filemap.c:3178 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323 call_write_iter include/linux/fs.h:1821 [inline] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_iter_write+0x70/0xa0 fs/read_write.c:973 lo_write_bvec+0x141/0x370 drivers/block/loop.c:274 lo_write_simple drivers/block/loop.c:296 [inline] do_req_filebacked drivers/block/loop.c:619 [inline] loop_handle_cmd drivers/block/loop.c:1926 [inline] loop_queue_work+0xa1c/0x20c0 drivers/block/loop.c:1940 kthread_worker_fn+0x292/0x730 kernel/kthread.c:700 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 8405: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] hfsplus_read_wrapper+0x2c7/0xf00 fs/hfsplus/wrapper.c:177 hfsplus_fill_super+0x30a/0x19e0 fs/hfsplus/super.c:413 mount_bdev+0x2fc/0x3b0 fs/super.c:1158 mount_fs+0xa3/0x310 fs/super.c:1261 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x115c/0x2f50 fs/namespace.c:2822 ksys_mount+0xcf/0x130 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3049 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8032: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb_partial+0x7e/0xa0 net/core/skbuff.c:4857 tcp_rcv_established+0x1b89/0x1ef0 net/ipv4/tcp_input.c:5649 tcp_v4_do_rcv+0x5d6/0x870 net/ipv4/tcp_ipv4.c:1547 tcp_v4_rcv+0x2c03/0x3b80 net/ipv4/tcp_ipv4.c:1832 ip_local_deliver_finish+0x495/0xc00 net/ipv4/ip_input.c:215 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x188/0x500 net/ipv4/ip_input.c:256 dst_input include/net/dst.h:461 [inline] ip_rcv_finish+0x1ca/0x2e0 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xca/0x3c0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:4954 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5066 netif_receive_skb_internal+0xf0/0x3f0 net/core/dev.c:5156 napi_skb_finish net/core/dev.c:5601 [inline] napi_gro_receive+0x2e6/0x450 net/core/dev.c:5632 receive_buf+0xc2c/0x6780 drivers/net/virtio_net.c:1088 virtnet_receive drivers/net/virtio_net.c:1352 [inline] virtnet_poll+0x568/0xe00 drivers/net/virtio_net.c:1457 napi_poll net/core/dev.c:6280 [inline] net_rx_action+0x4ac/0xfb0 net/core/dev.c:6346 __do_softirq+0x265/0x980 kernel/softirq.c:292 The buggy address belongs to the object at ffff88809cd41540 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff88809cd41540, ffff88809cd41740) The buggy address belongs to the page: page:ffffea0002735040 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff88809cd41a40 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002a9bb08 ffffea00026c9908 ffff88813bff0940 raw: ffff88809cd41a40 ffff88809cd41040 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809cd41600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809cd41680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809cd41700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff88809cd41780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88809cd41800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================