usercopy: Kernel memory overwrite attempt detected to SLUB object 'kmalloc-4k' (offset 0, size 32768)! ------------[ cut here ]------------ kernel BUG at mm/usercopy.c:102! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5005 Comm: sshd Not tainted 6.5.0-rc4-syzkaller-00009-g4b954598a47b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 RIP: 0010:usercopy_abort+0x83/0x90 mm/usercopy.c:102 Code: ce 49 89 ce 48 c7 c3 80 e5 16 8b 48 0f 44 de 48 c7 c7 20 e4 16 8b 4c 89 de 48 89 c1 41 52 41 56 53 e8 61 8d c8 08 48 83 c4 18 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 55 41 57 41 56 RSP: 0018:ffffc9000398f7f0 EFLAGS: 00010296 RAX: 0000000000000066 RBX: ffffffff8b16e580 RCX: 1c99b543c0edd900 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff816efc8c R09: 1ffff92000731eb0 R10: dffffc0000000000 R11: fffff52000731eb1 R12: 1ffffd40001c5f01 R13: 0000000000008000 R14: 0000000000000000 R15: 0000000000008000 FS: 00007f2b84d38800(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2279fd4cc0 CR3: 000000002d5a6000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __check_heap_object+0xad/0x100 mm/slub.c:4776 check_heap_object mm/usercopy.c:196 [inline] __check_object_size+0x2d8/0xa40 mm/usercopy.c:251 check_object_size include/linux/thread_info.h:215 [inline] check_copy_size include/linux/thread_info.h:251 [inline] copy_from_iter include/linux/uio.h:201 [inline] copy_from_iter_full include/linux/uio.h:209 [inline] skb_do_copy_data_nocache include/net/sock.h:2253 [inline] skb_copy_to_page_nocache include/net/sock.h:2279 [inline] tcp_sendmsg_locked+0x16eb/0x5010 net/ipv4/tcp.c:1198 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1333 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] sock_write_iter+0x39a/0x520 net/socket.c:1129 call_write_iter include/linux/fs.h:1871 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2b84916bf2 Code: 89 c7 48 89 44 24 08 e8 7b 34 fa ff 48 8b 44 24 08 48 83 c4 28 c3 c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 6f 48 8b 15 07 a2 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc6372cac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000008024 RCX: 00007f2b84916bf2 RDX: 0000000000008024 RSI: 000055ea364545b0 RDI: 0000000000000004 RBP: 000055ea36434220 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000055ea34ddeaa4 R13: 000000000000012f R14: 000055ea34ddf3e8 R15: 00007ffc6372cb38 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:usercopy_abort+0x83/0x90 mm/usercopy.c:102 Code: ce 49 89 ce 48 c7 c3 80 e5 16 8b 48 0f 44 de 48 c7 c7 20 e4 16 8b 4c 89 de 48 89 c1 41 52 41 56 53 e8 61 8d c8 08 48 83 c4 18 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 55 41 57 41 56 RSP: 0018:ffffc9000398f7f0 EFLAGS: 00010296 RAX: 0000000000000066 RBX: ffffffff8b16e580 RCX: 1c99b543c0edd900 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff816efc8c R09: 1ffff92000731eb0 R10: dffffc0000000000 R11: fffff52000731eb1 R12: 1ffffd40001c5f01 R13: 0000000000008000 R14: 0000000000000000 R15: 0000000000008000 FS: 00007f2b84d38800(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555555a78938 CR3: 000000002d5a6000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400