From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22799C4345F for ; Fri, 12 Apr 2024 13:21:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A36B16B0092; Fri, 12 Apr 2024 09:21:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C1586B0093; Fri, 12 Apr 2024 09:21:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 887CF6B0095; Fri, 12 Apr 2024 09:21:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6CCE76B0092 for ; Fri, 12 Apr 2024 09:21:22 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 17F721A0E4A for ; Fri, 12 Apr 2024 13:21:22 +0000 (UTC) X-FDA: 82000941204.05.ADE6EED Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id 6D16D1A0013 for ; Fri, 12 Apr 2024 13:21:20 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=m1JFCVe0; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of cem@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cem@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712928080; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AfNYRS6ZsPrybGUo8CxDMm4bY0WQ3q6pdW8qjM2dRFo=; b=coreDuLjcPYRFm86v+MHP+J9fIY15w5tMtvSIad2rjKT3U1L/v0D2FZHYubFOMzFMEEy4c ofLC6a5/fgm1OB+QVNqkzJGRvT/EawJh9rOcA9n/X+5+hP5iBX02cENUNDpiSJ9s93zjBq Hvqvi0DVaiMQY5h/h3YnKZFKYBXtE1Q= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=m1JFCVe0; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of cem@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cem@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712928080; a=rsa-sha256; cv=none; b=xeOGCd07bWaAFaUQKKlR2zHKWNt3dVGRTeYLRlqg5XIIRgfo1f6cQy+nJ9UI8Zn+0ORvKw 6s9m6IUh/0sRn1+n5ZTTr2ZFCvNV2Dg68M83BKzJp6Cpis0P5V3o6I+cCzqZwv6vOdtLd7 lojxt4rrIOa+VLFxU8GHTvwOcU4cYBo= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6A1B4621F3; Fri, 12 Apr 2024 13:21:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7269BC113CC; Fri, 12 Apr 2024 13:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712928079; bh=Z1K07HQ8BqhNlKs1ctvNePGPkoVPh/AI9KX/qoQb7ew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m1JFCVe0eEfucTtpOt0YVrSIoI34An299Cr+2oX1ybOuqsrD3v//vwkWqpzRbpRb/ WyZmLiyxoG8cVB/6LNHZReqtuILuGAidGAp1bhgcq/kDecw1AeoYHchIkP9MnbQA42 9Q4QcBeLsowmo4uOi0n8b1mx5IMJxJFZaH4XPv+vh3oRxTFQkh/rv2NnAaQXU4CEns 4NBNrU1I57w2sPDRmGpouttvCVqwFhVTNGCirAC3cHnv1RSEoD74o6lFWnk2utHs/m humYuWHjQQs7wkimRDQsW9z4/imaKMN7iqtJIqbeBblo2UCV1uHxAJtD9F0PmraZFB 9xdwYgao9mClQ== Date: Fri, 12 Apr 2024 15:21:14 +0200 From: Carlos Maiolino To: Andrew Morton Cc: syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Christian Brauner Subject: Re: [syzbot] [mm?] general protection fault in shmem_get_next_id Message-ID: References: <000000000000a1ff78061517a148@google.com> <20240403183339.7a257066e79ac04a7d6e33fd@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240403183339.7a257066e79ac04a7d6e33fd@linux-foundation.org> X-Rspamd-Queue-Id: 6D16D1A0013 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: no181h1aj18s1cft9mti96id3t6win1t X-HE-Tag: 1712928080-874979 X-HE-Meta: U2FsdGVkX1/KD4l4oQaIxJgXCiNd6OKBihnNO0+7XwugWen+pvQ4pIrbAix7GBeXJvPOlyvlZR88LcXvcKa+3H9QzpgAdBjnmUUDC7YJbRaX8nWDUNRLD6Aa+cCR7j0P5SqfiZT/HvDe3d+5aBtiOwFNxURNPgmu/nVm1l+0oHAjnb/XVfC2AUD9cMsnGW8Wb/fFhcC7K5yVyHoEXGFEZhujKnblpDZsu496w6cfT6rP92U9XNyR532/z1WKAcrvoLqxUeMCA4M+czIKFPYdaaFkrZwZROO9l79P3TBw8GJMpaYcnKEWCpSkXSD5aVE5DOygzlGbvCHv2eY4NXgyB0AAPsw2d4zRW8kYkKFTyJC6ZA9MdRiTDEO+THXpyoeEhz/RLnmkILuRPbS1msOLRGksMWc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ClVFu7iSGgaJSz5dcSqxc3tgoVQv9mbLb0gF4Gm4KMdUIFVumRCc3Va1xCYX4GznuDcUvAhPA/2p2qu7BpiAw9PU3QK8YLame5UZbq9OsaKsiVpnQxJplQ556vV3lUtNPfMBYymHh9bx9nUNn+j4UrCecJbAoEgIGemCi1znIgfBa5st8VjcYA5LMaXkMdZ7MbIOMngqX6qLWfWZFnNGfwMz1acx8qgz9SwKyqhL/vAFNnkh0fmotfQ1igvBjJtHqol9nCxzHPsrWaFUsSIxOOVM8AR+yzm9lZoxoe+m0hu9Tw5nZ9UERUcwsl+JtTduui7ZPlO84E1cplCARYMh1i8fE9v+P72BtodNdT2oP3OpCnKiJsTe2RLZiBOJ7z0HB1oFB8B0t5BoyYnvdNFiKMMdxCP3ZCVH0uWz3zWWiJHla3iENx0dbrFVAPfmq7bcfaroSWudc9kx0ETHl9ZLUVJ7DMhtz9BCeP/HgPU8D/o dI+psa2t irdZJXAgt7koznIJAptiMQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Apr 03, 2024 at 06:33:39PM -0700, Andrew Morton wrote: > On Mon, 01 Apr 2024 23:58:20 -0700 syzbot wrote: > > > Hello, > > Hello. > > Seems that the new TMPFS_QUOTA code has blown up. Cc's added, thanks > for the report and the reproducer! This seem to just have been hit the same race I fixed before, the HEAD commit described here didn't have the fix applied yet, I'll try to reproduce it locally just to confirm. Carlos > > > syzbot found the following issue on: > > > > HEAD commit: fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.kernel.. > > git tree: upstream > > console+strace: https://syzkaller.appspot.com/x/log.txt?x=10c90795180000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=fe78468a74fdc3b7 > > dashboard link: https://syzkaller.appspot.com/bug?extid=05e63c0981a31f35f3fa > > 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=17f51129180000 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=150d3cee180000 > > > > Downloadable assets: > > disk image: https://storage.googleapis.com/syzbot-assets/0f7abe4afac7/disk-fe46a7dd.raw.xz > > vmlinux: https://storage.googleapis.com/syzbot-assets/82598d09246c/vmlinux-fe46a7dd.xz > > kernel image: https://storage.googleapis.com/syzbot-assets/efa23788c875/bzImage-fe46a7dd.xz > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > Reported-by: syzbot+05e63c0981a31f35f3fa@syzkaller.appspotmail.com > > > > general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI > > KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] > > CPU: 0 PID: 5070 Comm: syz-executor253 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 > > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 > > RIP: 0010:shmem_get_next_id+0x92/0x5c0 mm/shmem_quota.c:119 > > Code: 04 db 49 8d 9c c6 90 02 00 00 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 f8 66 1b 00 48 8b 1b 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 df 66 1b 00 4c 8b 23 48 8d 5d 07 > > RSP: 0018:ffffc900043a7be0 EFLAGS: 00010256 > > RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8880266c8000 > > RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000004 > > RBP: ffffc900043a7d00 R08: ffffffff81dcdd47 R09: ffffffff822e7d5a > > R10: 0000000000000003 R11: ffffffff81dcdcf0 R12: 1ffff92000874fa0 > > R13: ffff888022110000 R14: ffff888022110000 R15: dffffc0000000000 > > FS: 0000555578677380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > CR2: 0000000020001000 CR3: 000000007a384000 CR4: 0000000000350ef0 > > Call Trace: > > > > dquot_get_next_dqblk+0x75/0x3a0 fs/quota/dquot.c:2705 > > quota_getnextquota+0x2c7/0x6c0 fs/quota/quota.c:250 > > __do_sys_quotactl_fd fs/quota/quota.c:1002 [inline] > > __se_sys_quotactl_fd+0x2a1/0x440 fs/quota/quota.c:973 > > do_syscall_64+0xfd/0x240 > > entry_SYSCALL_64_after_hwframe+0x6d/0x75 > > RIP: 0033:0x7f5c0349b329 > > 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:00007ffc39d71138 EFLAGS: 00000246 ORIG_RAX: 00000000000001bb > > RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f5c0349b329 > > RDX: 0000000000000000 RSI: ffffffff80000901 RDI: 0000000000000003 > > RBP: 00007f5c0350e610 R08: 0000000000000000 R09: 00007ffc39d71308 > > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 > > R13: 00007ffc39d712f8 R14: 0000000000000001 R15: 0000000000000001 > > > > Modules linked in: > > ---[ end trace 0000000000000000 ]--- > > RIP: 0010:shmem_get_next_id+0x92/0x5c0 mm/shmem_quota.c:119 > > Code: 04 db 49 8d 9c c6 90 02 00 00 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 f8 66 1b 00 48 8b 1b 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 df 66 1b 00 4c 8b 23 48 8d 5d 07 > > RSP: 0018:ffffc900043a7be0 EFLAGS: 00010256 > > RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8880266c8000 > > RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000004 > > RBP: ffffc900043a7d00 R08: ffffffff81dcdd47 R09: ffffffff822e7d5a > > R10: 0000000000000003 R11: ffffffff81dcdcf0 R12: 1ffff92000874fa0 > > R13: ffff888022110000 R14: ffff888022110000 R15: dffffc0000000000 > > FS: 0000555578677380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > CR2: 0000000020001000 CR3: 000000007a384000 CR4: 0000000000350ef0 > > ---------------- > > Code disassembly (best guess): > > 0: 04 db add $0xdb,%al > > 2: 49 8d 9c c6 90 02 00 lea 0x290(%r14,%rax,8),%rbx > > 9: 00 > > a: 48 89 d8 mov %rbx,%rax > > d: 48 c1 e8 03 shr $0x3,%rax > > 11: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) > > 16: 74 08 je 0x20 > > 18: 48 89 df mov %rbx,%rdi > > 1b: e8 f8 66 1b 00 call 0x1b6718 > > 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 38 00 cmpb $0x0,(%rax,%r15,1) <-- trapping instruction > > 2f: 74 08 je 0x39 > > 31: 48 89 df mov %rbx,%rdi > > 34: e8 df 66 1b 00 call 0x1b6718 > > 39: 4c 8b 23 mov (%rbx),%r12 > > 3c: 48 8d 5d 07 lea 0x7(%rbp),%rbx > > > > > > --- > > 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