From mboxrd@z Thu Jan 1 00:00:00 1970 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 557683BC669 for ; Fri, 17 Apr 2026 10:12:50 +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=1776420771; cv=none; b=DiqYMO3p3vWiEdH5i9c69A1JWsIBursh5eZR5uPt8pIiTQLtZSjz6KdsEJGP7X7LnUGNo4sCmlrzGmkGYQ/csjmzf033tpAiUuGhzW85Jx202qUCJ3hHNRoSyW25WxbHYackYxoLHC6Z7k2JLVSzh54X7i2ykodm2CenOhhdQFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776420771; c=relaxed/simple; bh=0VrT+ocOaKTDv5TYdj2DhOi3dv7uOU7/MGeri9iCf+Y=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=mUdLwpoV8cna0JSnIcLcRsrrFAUqHDGhLuocksBT4ar+Xnk8gW6R174eFl4GX395z7LzVb8pNJ/ke+mpesuyoH1IygV+bLyGbi3WdqVzIXTDKqcAKEQPrj2Zs52mHDiBWAjswKD2KmvCtIkssjY9Mz44xONTj0ydkF1KglbZyp4= 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-68478472f7eso931399eaf.3 for ; Fri, 17 Apr 2026 03:12:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776420769; x=1777025569; 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=jXjS+PUzzwbhUyqLn1l2RItKu6xKlQ3jGbc9wyWNB/A=; b=QlPtOoyT/2hk8gqxw2seQxf9854TINBWKKpnt4TOS0MunPpWCTepGvWBzT98N1io30 ojHOL7fuIjNCOK2kDbO1ZP3CpdQIPcdTZi3G1KNAMQb+3KXLeAg3YC9nPGoGdliULnOF um9TivYTT5bTtO31Ks7yN0b6MZFpDg0jyvRYrH6C6M0wOnuu0/qaoDoC96Detu2g/6P6 VhPU1Ba8d47aK1iy7kCSplJOY7B0JF+bxx7H83vpHSROAMDrbVcFmDiUbDUQxxMOH2wu jUah2jJBH0z6jzf7n8SVE6glhhcjSWUHDUP29Axy2WI7jAG+MFqjg8sC3NcdhOkLWuLx Ecnw== X-Gm-Message-State: AOJu0Yz3wbNmf2S7pk1A8LypqwnG/8XwY2hWWg3cx/Hd+nAvd5eMNsgk LvLyGQ/l4ZdZPQNGH/5ETA56rzLBLxFX45X9tkIPhWp4eFvoR4zR3UM2w+3UjTWyWcNk+SKkr+8 PbyhcD7W+Wys+7vL50hTnqzSpsMfyBbm3kxp8QJzJt2ahytHWqN/QrfleLoI= 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:f009:b0:68f:1d67:794e with SMTP id 006d021491bc7-69462e2de26mr1212952eaf.7.1776420769379; Fri, 17 Apr 2026 03:12:49 -0700 (PDT) Date: Fri, 17 Apr 2026 03:12:49 -0700 In-Reply-To: <0000000000008bbf19061531d31a@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69e207a1.050a0220.1de265.0013.GAE@google.com> Subject: Forwarded: [PATCH] jffs2: replace BUG_ON with warning in From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com 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] jffs2: replace BUG_ON with warning in Author: tristmd@gmail.com From: Tristan Madani #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master jffs2_del_ino_cache jffs2_del_ino_cache() panics the kernel via BUG_ON if the inode cache entry still has xattr references: BUG_ON(old->xref); This can be triggered by a crafted JFFS2 image where the CRC check path calls jffs2_do_clear_inode() while pino_nlink is non-zero. jffs2_xattr_delete_inode() skips cleanup when pino_nlink > 0, so the xref list survives into jffs2_del_ino_cache(), hitting the BUG_ON. Replace the BUG_ON with WARN_ON_ONCE to report the inconsistency without crashing the kernel. The leaked xrefs will be cleaned up when the filesystem is unmounted via jffs2_free_ino_caches(). Reported-by: syzbot+44664704c1494ad5f7a0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=44664704c1494ad5f7a0 Fixes: aa98d7cf59b5 ("[JFFS2][XATTR] XATTR support on JFFS2 (version 5)") Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani --- fs/jffs2/nodelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index XXXXXXX..XXXXXXX 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -459,7 +459,7 @@ void jffs2_del_ino_cache(struct jffs2_sb_info *c, struct jffs2_inode_cache *old) struct jffs2_inode_cache **prev; #ifdef CONFIG_JFFS2_FS_XATTR - BUG_ON(old->xref); + WARN_ON_ONCE(old->xref); #endif dbg_inocache("del %p (ino #%u)\n", old, old->ino); spin_lock(&c->inocache_lock); -- 2.43.0