------------[ cut here ]------------ kernel BUG at arch/x86/kernel/alternative.c:1041! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 21671 Comm: syz-executor.2 Not tainted 5.19.0-rc2-syzkaller-00428-g4336487e30c3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__text_poke+0x348/0x8e0 arch/x86/kernel/alternative.c:1041 Code: c3 0f 86 2c fe ff ff 49 8d bc 24 00 10 00 00 e8 7e b2 8d 00 48 89 44 24 30 48 85 db 74 0c 48 83 7c 24 30 00 0f 85 1b fe ff ff <0f> 0b 48 b8 00 f0 ff ff ff ff 0f 00 49 21 c0 48 85 db 0f 85 bf 02 RSP: 0018:ffffc9000fc3f838 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc900045f9000 RDX: 0000000000040000 RSI: ffffffff81b9cea3 RDI: 0000000000000005 RBP: 0000000000000040 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffffffffa0000b40 R13: 0000000000000040 R14: 0000000000000b80 R15: 0000000000002000 FS: 00007fcc3773b700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f916bb08c20 CR3: 00000000599ba000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: text_poke_copy+0x6d/0xa0 arch/x86/kernel/alternative.c:1186 bpf_arch_text_copy+0x21/0x40 arch/x86/net/bpf_jit_comp.c:2490 bpf_jit_binary_pack_finalize+0x44/0x110 kernel/bpf/core.c:1145 bpf_int_jit_compile+0xa74/0x13e0 arch/x86/net/bpf_jit_comp.c:2446 bpf_prog_select_runtime+0x2da/0x4b0 kernel/bpf/core.c:2219 bpf_migrate_filter+0x2dc/0x380 net/core/filter.c:1295 bpf_prepare_filter net/core/filter.c:1343 [inline] __get_filter+0x357/0x4e0 net/core/filter.c:1512 sk_attach_filter+0x1c/0x170 net/core/filter.c:1527 sock_setsockopt+0x1a55/0x3250 net/core/sock.c:1254 __sys_setsockopt+0x55e/0x6a0 net/socket.c:2252 __do_sys_setsockopt net/socket.c:2267 [inline] __se_sys_setsockopt net/socket.c:2264 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2264 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fcc36689109 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcc3773b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fcc3679bf60 RCX: 00007fcc36689109 RDX: 000000000000001a RSI: 0000000000000001 RDI: 0000000000000003 RBP: 00007fcc366e305d R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000400 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff28ad23cf R14: 00007fcc3773b300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__text_poke+0x348/0x8e0 arch/x86/kernel/alternative.c:1041 Code: c3 0f 86 2c fe ff ff 49 8d bc 24 00 10 00 00 e8 7e b2 8d 00 48 89 44 24 30 48 85 db 74 0c 48 83 7c 24 30 00 0f 85 1b fe ff ff <0f> 0b 48 b8 00 f0 ff ff ff ff 0f 00 49 21 c0 48 85 db 0f 85 bf 02 RSP: 0018:ffffc9000fc3f838 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc900045f9000 RDX: 0000000000040000 RSI: ffffffff81b9cea3 RDI: 0000000000000005 RBP: 0000000000000040 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffffffffa0000b40 R13: 0000000000000040 R14: 0000000000000b80 R15: 0000000000002000 FS: 00007fcc3773b700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcc3771a718 CR3: 00000000599ba000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400