From nobody Tue Apr 7 01:01:11 2026 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (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 70893247DE1 for ; Tue, 17 Mar 2026 06:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773728724; cv=none; b=AEukgUnQUsjBKBdN/PR5OEztpbQLgKtDGv1HfSylhiUMErv2afpJsGZ9+TKyXHyMqOEf96OrO8vCgl7ucpKjUSeEdiMpnjesgnxfQBHJSCxsJLubw+is3VpBUVouhpIit8R+gwr5qCHGMlIYn4jo8Nyq9/dmR976BcTr15J3K7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773728724; c=relaxed/simple; bh=Pk1+70M/rndphFlCq6Pp8QQhk/jVqcT6zeJuW6S3kDU=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=Yf0G8AQ/a6rbH59ShKPp62iCb37TJlOfoTPrTuh3N/lTdsYG9MQMeTDlWzGJvwIuFUOuJcfBdwEfUcJyT1IpEkSOpGTSploUDb/1flg1SRa/43ULE+MpGvgZB2cQNP/OWZdg4jBVn+1N7fu99KRXK4iI6prlM8Qqq3Jz2OsOC9o= 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.210.72 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-ot1-f72.google.com with SMTP id 46e09a7af769-7d7400fd1f9so47837891a34.2 for ; Mon, 16 Mar 2026 23:25:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773728722; x=1774333522; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hcoGK5C+GF9gfoLL01XjEph0uReLEanqRVqP50lafZY=; b=BVMY317FKbG35udI7C93OO/rfcLTj5VbeYl2v3f3u+5ITt+Y+YIQTR31kjc9CyaQ6C WbRIcubwpKboYJLDcYClmqmHuEATTzr7MTqNnILn2830mwgUuz+ySbFzrwmV5Gq4nrCG osMV09uPFshFVu1+GqbuaMdSxBzzZVSU0nUrPnBy9A7hfiaZVMLBgPEqQSOq+mevY7tw OXoGByCftAmlPxEzHsb63BTWns5cPI9x7spF/BZk6lE6Ge/BlxhNI4AfO9O73JOZcbRa uWWD9OwrTz47zfYlSw0tB3WwZLzK+nKTYU3C5YsTbaXXqjJNRQ8gsh6/edopsidocFxi H3gg== X-Gm-Message-State: AOJu0Yz8IrGuPP1pYA+GCqq9Gov96shownD75BDYac59VLXszKy3HYps dbXiTPNTpn1dNNmVbfjeoBgooCvKSepSv7k1FK81v4h6ZwMzYAdEDldLEKtee4hfuCm9/TxWvYA MDxyLpLTgQIA+iPb7D9o+IZvQDj6L7twW75ftBLu2jHy5mE5tZyxzqMk578U= 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:6820:4b18:b0:67b:aac1:5054 with SMTP id 006d021491bc7-67bda9bde9cmr9010175eaf.27.1773728722502; Mon, 16 Mar 2026 23:25:22 -0700 (PDT) Date: Mon, 16 Mar 2026 23:25:22 -0700 In-Reply-To: <69b8c713.a00a0220.3b25d1.0029.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69b8f3d2.050a0220.12d28.016b.GAE@google.com> Subject: Forwarded: [PATCH] nilfs2: fix missing i_assoc_inode initialization in nilfs_iget_for_shadow From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] nilfs2: fix missing i_assoc_inode initialization in nilfs_= iget_for_shadow Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gi= t master When nilfs_iget_for_shadow() finds a cached shadow inode (I_NEW not set), it returns the original inode instead of the cached shadow inode. This causes nilfs_mdt_setup_shadow_map() to store the wrong inode as shadow->inode, so subsequent calls to nilfs_mdt_save_to_shadow_map() dereference the wrong inode's i_assoc_inode which may be NULL, leading to a general protection fault. Fix this by returning s_inode instead of inode on the cache hit path. Reported-by: syzbot+4b4093b1f24ad789bf37@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3D4b4093b1f24ad789bf37 Signed-off-by: Deepanshu Kartikey --- fs/nilfs2/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 51bde45d5865..60cfcc209cf7 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -686,6 +686,10 @@ struct inode *nilfs_iget_for_shadow(struct inode *inod= e) nilfs_iget_set, &args); if (unlikely(!s_inode)) return ERR_PTR(-ENOMEM); + pr_err("NILFS DEBUG: s_inode=3D%px I_NEW=3D%d i_assoc=3D%px\n", + s_inode, + !!(inode_state_read_once(s_inode) & I_NEW), + NILFS_I(s_inode)->i_assoc_inode); if (!(inode_state_read_once(s_inode) & I_NEW)) return inode; =20 --=20 2.43.0