From nobody Mon Apr 6 14:08:42 2026 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (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 010B63A9616 for ; Thu, 19 Mar 2026 08:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773908740; cv=none; b=Cf4NZYqIkf95/5jgj3A3uTtRX7pw0vQM7GjQGLXPXeR2A5WXHmMnhAp/GA30d5FfSqsdIhmXUv38h2IRCYDpm/XlzK0iKR2YZFl4JdU5QQoFLbGDoC2EBKG2bKQ13oCi4h0mzyP/Zu7lxO1B0J5dzGFFk1Ys8UMnLVpplwMJ1LA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773908740; c=relaxed/simple; bh=5giymIpuS98B1nat6Jd8/P4uXsZq5xKSlHzy7eNSPvE=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=p83bhGvYtr3XBG3pIvZdse3YXrDMLXFoRH/QJON5FbctBcwFcXbFj7l9FxfOFaZhvrk5r7LoOzhFHtpvEnUZ5j8QE+DLGbvjFsM5eUCH4LmZVLnVZ2kdaqloil6iucarpRAxt7nENkHoMqpc4VNEKjbgWX9j35kxzENNC+jOXfE= 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.161.71 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-oo1-f71.google.com with SMTP id 006d021491bc7-672c40f3873so17192555eaf.2 for ; Thu, 19 Mar 2026 01:25:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773908733; x=1774513533; 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=TIRuP8CJh0+Bkc1dKa3bJF6HT8YM+O8qW5anqW1v3yQ=; b=TW2E1lQmTZMfK8ss3FpRHFNZtViNq8m8u3o/vWKQ9mDZJcC7b36XsI44UbPB1tteIF Ic+HUj/SQtcHa3+9GA3UDjNctyfQDVQImXucNj6Y1cqXE4mqVGr+eY8GRAzrHROYAeC2 AFOcGC4rrAW4QDwNOblH542sO2aijrUsnKl2wzDuOOZ6p6o0aPfGemzWpIUaWE2t8AB7 DGSP9+S0mE7zG7Tlo+ewjRqIGlm4xvGftKC4KWLClmvRiz5eOaSAae0OXHfAyANn7G5I QuN4/lrPQv/A8rRkqk68R8rPJ5yxpKyZTkXhXplncAyLk3ykbPIaw29i2tZx4B7xpAGB Rhsg== X-Gm-Message-State: AOJu0YwGsolKE5GIj8qngJWCX7QjgXt+QATLcu0ZRs5r3jziMxqc4AS9 GyEHhTxyuEgfy4U5ohXHwyc7uBcWh/YA5sEIXtDfFKYPHb4H3n4CGPlOP3LzOUGQ+n3d4dXkfxr ByaJADh3dmxPTWCL5XUCaZhwY/CpnN3EObfb9/eA/ISTE5tL/kkrX7ZIera4= 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:450e:b0:679:e930:b553 with SMTP id 006d021491bc7-67c0da8fe8amr3358062eaf.32.1773908733666; Thu, 19 Mar 2026 01:25:33 -0700 (PDT) Date: Thu, 19 Mar 2026 01:25:33 -0700 In-Reply-To: <69bba3ff.050a0220.227207.0031.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69bbb2fd.050a0220.3a088d.000e.GAE@google.com> Subject: Forwarded: [PATCH] nilfs2: fix missing continue after -ENOENT in nilfs_ioctl_mark_blocks_dirty() 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 continue after -ENOENT in nilfs_ioctl_= mark_blocks_dirty() Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= master nilfs_ioctl_mark_blocks_dirty() calls nilfs_bmap_lookup_at_level() to get the current block number of each block descriptor. When the lookup returns -ENOENT, meaning the block does not exist, it sets bd_blocknr to 0 and continues processing. However, if bd_oblocknr is also 0, the subsequent check: if (bdescs[i].bd_blocknr !=3D bdescs[i].bd_oblocknr) continue; will not skip the block, and nilfs_bmap_mark() will be called on a non-existent block. This causes nilfs_btree_do_lookup() to return -ENOENT, triggering the WARN_ON(ret =3D=3D -ENOENT). Fix this by adding a continue statement after setting bd_blocknr to 0 when the lookup returns -ENOENT, so that dead blocks are always skipped regardless of the value of bd_oblocknr. Fixes: 7942b919f732 ("nilfs2: ioctl operations") Reported-by: syzbot+98a040252119df0506f8@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=3D98a040252119df0506f8 Signed-off-by: Deepanshu Kartikey --- fs/nilfs2/ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index e17b8da66491..1615a314f557 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c @@ -745,6 +745,7 @@ static int nilfs_ioctl_mark_blocks_dirty(struct the_nil= fs *nilfs, if (ret !=3D -ENOENT) return ret; bdescs[i].bd_blocknr =3D 0; + continue; } if (bdescs[i].bd_blocknr !=3D bdescs[i].bd_oblocknr) /* skip dead block */ --=20 2.43.0