overlayfs: workdir and upperdir must reside under the same mount ================================================================== BUG: KASAN: slab-out-of-bounds in atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline] BUG: KASAN: slab-out-of-bounds in extBalloc fs/jfs/jfs_extent.c:557 [inline] BUG: KASAN: slab-out-of-bounds in extAlloc+0xb8e/0xdb0 fs/jfs/jfs_extent.c:138 Write of size 4 at addr ffff8880ab940958 by task syz-executor.2/10192 CPU: 1 PID: 10192 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/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 atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline] extBalloc fs/jfs/jfs_extent.c:557 [inline] extAlloc+0xb8e/0xdb0 fs/jfs/jfs_extent.c:138 jfs_get_block+0x1f5/0xae0 fs/jfs/inode.c:258 nobh_write_begin+0x446/0x1030 fs/buffer.c:2619 jfs_write_begin+0x3e/0x1a0 fs/jfs/inode.c:323 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170 __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] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 dump_emit+0x183/0x300 fs/coredump.c:801 elf_core_dump+0x33c0/0x4c10 fs/binfmt_elf.c:2392 do_coredump+0x1d4e/0x2d60 fs/coredump.c:765 get_signal+0xed9/0x1f70 kernel/signal.c:2583 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f8343ba1707 Code: 08 89 3c 24 48 89 4c 24 18 e8 e5 f8 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 15 f9 ff ff 48 8b RSP: 002b:00007f83424bcf00 EFLAGS: 00000293 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffe5 RBX: 000000000000031a RCX: 00007f8343ba1707 RDX: 0000000000000001 RSI: 000000002001d820 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000000 R10: 0030656c69662f2e R11: 0000000000000293 R12: 0000000000000005 R13: 0000000020000230 R14: 0000000000000002 R15: 00007f8343c39a20 Allocated by task 10150: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] dbMount+0x4d/0x880 fs/jfs/jfs_dmap.c:176 jfs_mount+0x124/0x3d0 fs/jfs/jfs_mount.c:133 jfs_fill_super+0x55c/0xb50 fs/jfs/super.c:589 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 0: __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+0x46/0x60 net/core/skbuff.c:654 sk_wmem_free_skb include/net/sock.h:1468 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1769 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3160 [inline] tcp_ack+0x1d1e/0x51d0 net/ipv4/tcp_input.c:3695 tcp_rcv_established+0x13e3/0x1ef0 net/ipv4/tcp_input.c:5594 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 ffff8880ab940280 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1752 bytes inside of 2048-byte region [ffff8880ab940280, ffff8880ab940a80) The buggy address belongs to the page: page:ffffea0002ae5000 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002afdd88 ffffea0002aff908 ffff88813bff0c40 raw: 0000000000000000 ffff8880ab940280 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ab940800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880ab940880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880ab940900: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ^ ffff8880ab940980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880ab940a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================