Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2167851lqt; Mon, 22 Apr 2024 03:37:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhx4R2/6eCYJK48qSDHgr4ls4oL7D1rjPIt6WFjO5gWGOVSmXm75QeRxwLVIiubhVs94yB/qURI5OESU/8a5DQ+Vx+amjwQC6mbGvasg== X-Google-Smtp-Source: AGHT+IEdRsk5uOqEWCdcAG4yt6pSinSYFZHnQ6xSgTBuPZxH+NrBROPK2OVvL5x8Hcd0KYCQRvtB X-Received: by 2002:a05:620a:2905:b0:790:798e:b891 with SMTP id m5-20020a05620a290500b00790798eb891mr2049465qkp.13.1713782238722; Mon, 22 Apr 2024 03:37:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713782238; cv=pass; d=google.com; s=arc-20160816; b=FBQNJ65/GMHyOOIFWR8UvR8bogcpqfkF2/y4xKIyUKDzEM7O1RS/Md2+uOLerydTuv Xdcfg5HbySx7++eusehYMHXyTBBn/LelUuCT66KpaRPUxX7fp9U1U/XuDLoeQ9UrQPKS +i62AbnpVEA60BIisTr3Z+W4lpmeZs+cqbyoIvrTIdARnVnXkiF2DqkrmTTFI7IrskDw lzitD1Upn/0mlx6LIGFzRBkB7NRJbincI4MPwZZ/ygpOt9Et7/xBKahRkKgLEAIJFk2W S4wwrNMzaYUzs2x0AqN3eBFKEAQnx4SpeHXonLsmg10RMof1aZYXYKXN00f95Mvu0Lhh n1bQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=v8RuM16QeIyzsfrQ1n0ZR7I26WXKSEpqyKR98IhNnDg=; fh=y0nrQhFLmZWQExJv+9dCwF6sgPg2fIrRCa/nOwk3EJo=; b=TsTuazNbqUfbPjQo4+WZPMEUwfub+0tOm2vedbzo2Opjn4+ZPFDWrAZe4dM2ui56qb xXL7n/lbP6Jx+kOWd9Q3v9tBOJwTiwAfhVPp4OuvXjW2nLxRrBBk8eXAcXzEMbWi4dEU OOv4wQtsHpDDUsUz27I8k5vm+HNQPOH0ccAhROoOz0i+pGi6nXoIpL5IPGUaH8MymFTs CJpDAYoYlZXa6V+WPxqD9/0vZIBpbhCNVNByQUW5OBYe37kirKXanGmX6I16ne1TEQoc fkOXxR10Vk3viG/VFwMNpRGkhGhC1EWbcSEYVnvZLyrphD2purO3TV+rNrG/Npl6yaOI OBnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NvNn7XoQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153197-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153197-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v12-20020a05620a0a8c00b0078d6b4b06e7si10128878qkg.64.2024.04.22.03.37.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:37:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153197-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NvNn7XoQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153197-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153197-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 411E81C214C0 for ; Mon, 22 Apr 2024 10:37:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BBB0145B10; Mon, 22 Apr 2024 10:37:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NvNn7XoQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BBE722625; Mon, 22 Apr 2024 10:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713782222; cv=none; b=FC+CL44JNJZbYLUIFdpE2Y7/xt0DYJd4tmfBuTW8zy0P9Q4kvN/tMktZ3mdoj+iZEpN41J0CxI7RyRZzrVLn8OZBFl02Ohv3V53e7H1WWGjiY3AhmlBns3H2hliHi4PIsb1AhFR7x70HmQ/pE18svrdqTgMSRnQxDHrEIXitYcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713782222; c=relaxed/simple; bh=n8gef8RT3nsKxxTBm2NGWXOHd1tFNZoyt+MDsqul+48=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=o86EEeBRyf3xd3dP0FFunNA6j7i7o8HDl/nlf0/KVRaC3PfW3C7gDb7N2j1YsPURQNlnuKBLMTa/9BhNFpsWaquOpPc9eL+lx4zyc7ZvY988KFlHKPeZn+MsxxcTomlt7lOF14PWAaJs+Bpp4OspWtia7EJ73HhnhBToweUb2Ww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NvNn7XoQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28746C4AF08; Mon, 22 Apr 2024 10:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713782222; bh=n8gef8RT3nsKxxTBm2NGWXOHd1tFNZoyt+MDsqul+48=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NvNn7XoQ4uPkrqZcjCndtaZg70gIDsH4sf+qGcMYwfW2Bc6NU/dpDAeooE7RewFK1 HGHzUUYGAJueM1EgLymPtjlaEXARapga2nQ4Bk5r6rfscrpRI5lJ0tmsY74V2NuNnw mMkbTJ3ASI66xJWKVOnQPaXClwD424n2k9Hh/TDAnfg4Jm2pDw1gPLO0PrXPfhfbqx CeIFqVFKA4X/u+ymC6nNBdnQH3GdmgCSwOtFuPlYH+Zd2oFgKu2/nZCxZHNqGvWw++ cwHCCAv2HUh65/dxIsflVsEpmJwQwSIRNjX2hA83jcY1Ht1LtA+8Px1bIVFFTsagte L8Ib3aHEBUVLQ== Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a55b2f49206so134025966b.1; Mon, 22 Apr 2024 03:37:02 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVHV/UbgBZS7NRJLVZpBmMR1yxwBrLxc9yO5mO1A3XJns5kZMv13oU7Youx5UGkUcjggB4wjYwIbvXGdgQZXSGWX/yzu86qNyUZktfBh6YO06mca91lD/sBMD806Vb/SiaT X-Gm-Message-State: AOJu0Yx1otPquVcI6OEY9ahg0d/pRt0pisxZQgNeCjxtzHXtmRN1ynXG bUhus2NRShae5OYBlsWpZdLc1m4BO7gZ+3t5weaM9JlpTM9KvVOMOQDGoL8JBdqQ0NSfdg3hTiF ozPMmOd8r/2Yu8c775tO+h/VkHlY= X-Received: by 2002:a17:907:7215:b0:a55:75f7:42fb with SMTP id dr21-20020a170907721500b00a5575f742fbmr13673572ejc.24.1713782220612; Mon, 22 Apr 2024 03:37:00 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <0000000000004792a90615a1dde0@google.com> In-Reply-To: From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Date: Mon, 22 Apr 2024 12:36:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [syzbot] [bpf?] BUG: unable to handle kernel paging request in bpf_prog_ADDR (2) To: Stanislav Fomichev Cc: Alexei Starovoitov , syzbot , Andrii Nakryiko , Alexei Starovoitov , bpf , Daniel Borkmann , Eddy Z , Hao Luo , John Fastabend , Jiri Olsa , KP Singh , LKML , Martin KaFai Lau , Song Liu , syzkaller-bugs , Yonghong Song Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 20 Apr 2024 at 00:42, Stanislav Fomichev wrote: > > On 04/19, Alexei Starovoitov wrote: > > On Mon, Apr 8, 2024 at 8:53=E2=80=AFPM syzbot > > wrote: > > > > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit: fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.k= ernel.. > > > git tree: upstream > > > console+strace: https://syzkaller.appspot.com/x/log.txt?x=3D125962231= 80000 > > > kernel config: https://syzkaller.appspot.com/x/.config?x=3D4d90a36f0= cab495a > > > dashboard link: https://syzkaller.appspot.com/bug?extid=3D838346b9798= 30606c854 > > > 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=3D134ecbb= 5180000 > > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=3D141a8b3d1= 80000 > > > > > > Downloadable assets: > > > disk image: https://storage.googleapis.com/syzbot-assets/f6c04726a2ae= /disk-fe46a7dd.raw.xz > > > vmlinux: https://storage.googleapis.com/syzbot-assets/09c26ce901ea/vm= linux-fe46a7dd.xz > > > kernel image: https://storage.googleapis.com/syzbot-assets/134acf7f53= 22/bzImage-fe46a7dd.xz > > > > > > IMPORTANT: if you fix the issue, please add the following tag to the = commit: > > > Reported-by: syzbot+838346b979830606c854@syzkaller.appspotmail.com > > > > > > BUG: unable to handle page fault for address: 0000001000000112 > > > #PF: supervisor read access in kernel mode > > > #PF: error_code(0x0000) - not-present page > > > PGD 800000002e7b1067 P4D 800000002e7b1067 PUD 0 > > > Oops: 0000 [#1] PREEMPT SMP KASAN PTI > > > CPU: 0 PID: 5060 Comm: syz-executor351 Not tainted 6.8.0-syzkaller-08= 951-gfe46a7dd189e #0 > > > Hardware name: Google Google Compute Engine/Google Compute Engine, BI= OS Google 03/27/2024 > > > RIP: 0010:bpf_prog_a8e24a805b35c61b+0x19/0x1e > > > Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc f3 0f 1e fa = 0f 1f 44 00 00 66 90 55 48 89 e5 f3 0f 1e fa 31 c0 48 8b 7f 18 <8b> 7f 00 c= 9 c3 cc cc cc cc cc cc 40 03 00 00 cc cc cc cc cc cc cc > > > RSP: 0018:ffffc90003b07b30 EFLAGS: 00010246 > > > RAX: 0000000000000000 RBX: ffffc90000ace048 RCX: ffff88802aa89e00 > > > RDX: 0000000000000000 RSI: ffffc90000ace048 RDI: 0000001000000112 > > > RBP: ffffc90003b07b30 R08: ffffffff81bf633c R09: 1ffffffff2595ca0 > > > R10: dffffc0000000000 R11: ffffffffa000095c R12: ffffc90000ace030 > > > R13: ffff88802ac3ae28 R14: dffffc0000000000 R15: ffff88802ac3ae28 > > > FS: 000055558f759380(0000) GS:ffff8880b9400000(0000) knlGS:000000000= 0000000 > > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > > CR2: 0000001000000112 CR3: 0000000077cfa000 CR4: 00000000003506f0 > > > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > > > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > > > Call Trace: > > > > > > bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] > > > __bpf_prog_run include/linux/filter.h:657 [inline] > > > bpf_prog_run include/linux/filter.h:664 [inline] > > > bpf_prog_run_array_cg kernel/bpf/cgroup.c:51 [inline] > > > __cgroup_bpf_run_filter_setsockopt+0x6fa/0x1040 kernel/bpf/cgroup.c:= 1830 > > > do_sock_setsockopt+0x6b4/0x720 net/socket.c:2293 > > > __sys_setsockopt+0x1ae/0x250 net/socket.c:2334 > > > __do_sys_setsockopt net/socket.c:2343 [inline] > > > __se_sys_setsockopt net/socket.c:2340 [inline] > > > __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340 > > > do_syscall_64+0xfb/0x240 > > > entry_SYSCALL_64_after_hwframe+0x6d/0x75 > > > > This one looks interesting. > > But I cannot reproduce it. > > > > Bjorn or Stan, > > > > Could you take a look? > > > > Probably a race in xdp dispatcher setup or the way cgroup-lsm > > logic is doing it. > > Managed to repro it by hacking the C reproducer to attach bpf prog > to /sys/fs/cgroup instead of syzkallers custom path. Will try to > poke it a bit more.. Stan, did you get anywhere? Please share your hack, where you manage to reproduce the issue. Cheers, Bj=C3=B6rn