Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp958224lqh; Sun, 5 May 2024 09:14:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrVnJ1IKfLKEPDowZUh/n84HHvSckqlAIa00G9/5EkkhQr8U1YHvkzkpJPODGEOJsp3SsmldCprk44Awk2rr9jiiLVgy0jsbXnAlCMhA== X-Google-Smtp-Source: AGHT+IFj5JSm8+XIxdoSVPNQK2WJhLAnECvjPQVkH+z/LvDQkVhY3+iz9O6ivcHbkRjQAjBqmM+y X-Received: by 2002:a05:622a:111:b0:43a:b8e0:4536 with SMTP id u17-20020a05622a011100b0043ab8e04536mr10992214qtw.4.1714925645943; Sun, 05 May 2024 09:14:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714925645; cv=pass; d=google.com; s=arc-20160816; b=WtXzKgSuVgHm/48ks9k0lIdRPppH+Bgvn73oND4XDvDMFgDVLv/TWWq1+U7vCW6wGL PvWwKnsm6dVAiTDYRNWPgSCbSsxV7wAus3EZrQZoJED99jELybxRWON5SdRqVLyK/jUC eBWakbLkr+jL31x4Q6nMoxcIBjmUyJkhu/yXyWdIPxxvDup71s4u8/D42bNoQWdWdJpv fx144E4ltJPKWBTs74UAQC6zTo+VgQaB+WCNVx/s4bR79F2FZLh5p+gpaDxh6mv5LBA8 W+E/n3muc474lAj1ypIX9Hdy0M6ewlqe2KFmdbrcoQven9zMXO3jsJXU9nwuo3hrYNly +uXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:date:mime-version:list-unsubscribe :list-subscribe:list-id:precedence; bh=iOkOYyTsI2vSWVysiza8WXlk82ny5djsTkzb/e0BsTU=; fh=qdfodCzAsp5ZN3eDIGrazKlPebwZ1xTlFhIUX3Rr1wo=; b=FQ3Q2QHzCAaikG7uOIXNffxwWrgFw9fhOmzs/v4EJOPXX8jLi0e8O7kL4ukWD+KcYS QwrKzlasODUC8tDvIsiQUcn5xBz4ZSR//4Eso8mzGSxkwAwe0BJWjNW3gaYy2MFdyKcC RwqmmjVtzMcQFizM+FxrMsJg0UT01ABIdDyaXL6s//kac1N1RqFT3naxUhv7ptEVr0Yd KXlqUQGr/PUgA4ZJschOnZ81XXfxGQSCNzzgrsW5xC4LjNFxuf/+BQ6skyhSJJwbBtMf PnHv7+iJPtDFtoyBs4Zx/JmI3ysMBhT0/E6T/Sp79wOtqrjEEznYUqfgteKwYXeP/xyQ 6ADQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-169054-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169054-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c17-20020ac85a91000000b0043a0f588a2dsi7936782qtc.487.2024.05.05.09.14.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 09:14:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169054-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-169054-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169054-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 977331C20AAE for ; Sun, 5 May 2024 16:14:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E7295CDD0; Sun, 5 May 2024 16:13:36 +0000 (UTC) Received: from mail-il1-f207.google.com (mail-il1-f207.google.com [209.85.166.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDA2B374CB for ; Sun, 5 May 2024 16:13:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714925615; cv=none; b=pJb0QG2ekSGL4py4g1Msra6MSpDbAaHkB1l35nzaPBs+q2NKxgbJf6uTydLXaqwySnERNPllcX0JyXbk1v+HRQ0TElPypXkVYvNXTxOb195qSqiNjeqSo3WRSXM7cfUbQsegLCg8cRIEixpFAE5PELJoGfMWfm6AneF1iCFnxaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714925615; c=relaxed/simple; bh=b3AWUJT6Y2r0Cpa7zIUm4iw7ILdY7k2g+YUuZ57sH1I=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=gfUwD+SaLDGToS+pM6Mlp2TLGLewswH8TlAqzdWnxU+nHu4EaX+xOeq/saAxauvALHX0450PNM06ELQfi1cN4jWwNOFo6fNrrSq6OAoMn0TASF2I5npjmFjtujVmlnGfvYRFpjAM1ELP9JuuZM+EO44ksP+euH/F4rWU/oEislw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f207.google.com with SMTP id e9e14a558f8ab-36c80caae04so16398705ab.2 for ; Sun, 05 May 2024 09:13:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714925613; x=1715530413; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iOkOYyTsI2vSWVysiza8WXlk82ny5djsTkzb/e0BsTU=; b=kNe5opp0S83hgH9MrElvJwVBXOXxyvtzDzFWUIlyHJpFgR5e806OBoUZha3jDjY7Za WyIPfIIlBN/vbDiarjCrgQCVw/6VKPhh9otTygSbHxvKNEI7QJLyFMBe4gkEqr13bzBO 9Nshcv2G6zCsUnxLR2wHDavRA1Ni6W1+9T0/elc28k+Rzkft8UGm1rFm8tKKgHLpHbek DwmFDLeJh6RerVpZOrjUg5e+Q+YNEXx72wgZncnVvPIGtde2S11KicjqpGGST4XPzWPa ZU7FQQt4DrxpPgStKxlmAhtSaP05zW+KGE5UBUfupJpCczoNAhCadz+grGSn+8q0Hi7e f/Ig== X-Forwarded-Encrypted: i=1; AJvYcCVTvDWVjuuRRhGkkkSzaVJJTJBGYqrO9dacQtUbGwx+Nl8igQHCaBdMpOX4CR4izK9/I/V4SoP1f8l9Oil61IOfqoHJ96ia4jjrauxT X-Gm-Message-State: AOJu0YyjmSQbVgsAnZ6xpIu+7lRQTv9+GdmgmlH9oJmlbBZ/21kgGfx9 B6pXmcnF/mpW8u93dlX3P+HV+V9wuVeuDoZjWKwm9QGuhLVVgkQYWS15d6XV7bfsalYDknDjpn0 OslLqz2MTVHsUXGdPJDoRk+86/PRuiUKLJj/4bQwDbI9CCYDkLVubx74= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:20c3:b0:36c:1004:9aa1 with SMTP id 3-20020a056e0220c300b0036c10049aa1mr377919ilq.3.1714925613190; Sun, 05 May 2024 09:13:33 -0700 (PDT) Date: Sun, 05 May 2024 09:13:33 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000fda0400617b73b57@google.com> Subject: [syzbot] [bpf?] [trace?] general protection fault in bpf_get_attach_cookie_tracing From: syzbot To: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, martin.lau@linux.dev, mathieu.desnoyers@efficios.com, mhiramat@kernel.org, netdev@vger.kernel.org, rostedt@goodmis.org, sdf@google.com, song@kernel.org, syzkaller-bugs@googlegroups.com, yonghong.song@linux.dev Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: a9e7715ce8b3 libbpf: Avoid casts from pointers to enums in.. git tree: bpf-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=153c1dc4980000 kernel config: https://syzkaller.appspot.com/x/.config?x=e8aa3e4736485e94 dashboard link: https://syzkaller.appspot.com/bug?extid=3ab78ff125b7979e45f9 compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17d4b588980000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16cb0470980000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/a6daa7801875/disk-a9e7715c.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/0d5b51385a69/vmlinux-a9e7715c.xz kernel image: https://storage.googleapis.com/syzbot-assets/999297a08631/bzImage-a9e7715c.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+3ab78ff125b7979e45f9@syzkaller.appspotmail.com general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 5082 Comm: syz-executor316 Not tainted 6.9.0-rc5-syzkaller-01452-ga9e7715ce8b3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:____bpf_get_attach_cookie_tracing kernel/trace/bpf_trace.c:1179 [inline] RIP: 0010:bpf_get_attach_cookie_tracing+0x46/0x60 kernel/trace/bpf_trace.c:1174 Code: d3 03 00 48 81 c3 00 18 00 00 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 54 b9 59 00 48 8b 1b 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 3b b9 59 00 48 8b 03 5b 41 5e c3 RSP: 0018:ffffc90002f9fba8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888029575a00 RDX: 0000000000000000 RSI: ffffc90000ace048 RDI: 0000000000000000 RBP: ffffc90002f9fbc0 R08: ffffffff89938ae7 R09: 1ffffffff25e80a0 R10: dffffc0000000000 R11: ffffffffa0000950 R12: ffffc90002f9fc80 R13: dffffc0000000000 R14: dffffc0000000000 R15: 0000000000000000 FS: 0000555578992380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002e3e9388 CR3: 00000000791c2000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bpf_prog_fe13437f26555f61+0x1a/0x1c bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_prog_test_run_raw_tp+0x149/0x310 net/bpf/test_run.c:732 bpf_prog_test_run_raw_tp+0x47b/0x6a0 net/bpf/test_run.c:772 bpf_prog_test_run+0x33a/0x3b0 kernel/bpf/syscall.c:4286 __sys_bpf+0x48d/0x810 kernel/bpf/syscall.c:5700 __do_sys_bpf kernel/bpf/syscall.c:5789 [inline] __se_sys_bpf kernel/bpf/syscall.c:5787 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5787 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f53be8a0469 Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 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:00007ffdcf680a08 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007ffdcf680bd8 RCX: 00007f53be8a0469 RDX: 000000000000000c RSI: 0000000020000080 RDI: 000000000000000a RBP: 00007f53be913610 R08: 0000000000000000 R09: 00007ffdcf680bd8 R10: 00007f53be8dbae3 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffdcf680bc8 R14: 0000000000000001 R15: 0000000000000001 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:____bpf_get_attach_cookie_tracing kernel/trace/bpf_trace.c:1179 [inline] RIP: 0010:bpf_get_attach_cookie_tracing+0x46/0x60 kernel/trace/bpf_trace.c:1174 Code: d3 03 00 48 81 c3 00 18 00 00 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 54 b9 59 00 48 8b 1b 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 3b b9 59 00 48 8b 03 5b 41 5e c3 RSP: 0018:ffffc90002f9fba8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888029575a00 RDX: 0000000000000000 RSI: ffffc90000ace048 RDI: 0000000000000000 RBP: ffffc90002f9fbc0 R08: ffffffff89938ae7 R09: 1ffffffff25e80a0 R10: dffffc0000000000 R11: ffffffffa0000950 R12: ffffc90002f9fc80 R13: dffffc0000000000 R14: dffffc0000000000 R15: 0000000000000000 FS: 0000555578992380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002e3e9388 CR3: 00000000791c2000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: d3 03 roll %cl,(%rbx) 2: 00 48 81 add %cl,-0x7f(%rax) 5: c3 ret 6: 00 18 add %bl,(%rax) 8: 00 00 add %al,(%rax) a: 48 89 d8 mov %rbx,%rax d: 48 c1 e8 03 shr $0x3,%rax 11: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) 16: 74 08 je 0x20 18: 48 89 df mov %rbx,%rdi 1b: e8 54 b9 59 00 call 0x59b974 20: 48 8b 1b mov (%rbx),%rbx 23: 48 89 d8 mov %rbx,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 48 89 df mov %rbx,%rdi 34: e8 3b b9 59 00 call 0x59b974 39: 48 8b 03 mov (%rbx),%rax 3c: 5b pop %rbx 3d: 41 5e pop %r14 3f: c3 ret --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup