From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E0FD606A31A for ; Mon, 30 Nov 2026 21:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=SmT5M0q7 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:Message-ID:Date: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Unsubscribe-Post:List-Owner; bh=eBKfNV1b4Wr8WdcMKzf+RuRbdtof1fcnVCFxlRBTKfk=; b=SmT5M0q7GFtxXHxoCZpNe35AJG nCkoiTYvrOeM6I/0iqOmHTZXTiT3MDN1D9x3E+edSONFo8bx1MA4mE9W9TGq7A2Z3Iyl44erdMqYt ZSEua978Nmf4HGBZklj3n3THex/wFdoXAyxaP0LWgXWz1kouOrg9sqZYivzYy0fqUF11Ebk7aERyU MGnxPIFhIBpjZUCKoE8+Hbt20xJT+CWLjP/EVTXEX6ICIbY0DVPeLahYJV2br6Kl+vwZFMbX+zw5L 7L8detGJJjZV+8OVTF0EcQ6WdRPSrTwOvKgLTesa9EI8pLMbDQrY6Of62ue9+80f0e5X709AiCGnj TUEbpfkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY91f-00000005syO-20bu; Mon, 30 Nov 2026 21:35:07 +0000 Received: from mail-oi1-f199.google.com ([209.85.167.199]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY91c-00000005sw7-2SiZ for linux-mtd@lists.infradead.org; Mon, 30 Nov 2026 21:35:06 +0000 Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-54dbbf252cdso10815689b6e.2 for ; Mon, 30 Nov 2026 13:35:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796074502; x=1796679302; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JycEzyxQQVrk4aoDI0iib1OiqusWZxuJv9gzl245oik=; b=0E99s4I80Amfu4RvSQ4evSAvLiFMbwvZpa5Pw4mKPu7u6hT5qNmSzvXE5ow0re0+zq ptZxDlSgZcccx6F1nL8fO1nKb0WsRfbFPHehdvn1brkpMyIFUf8JV9Ogb/dENzsoqw2q gpgRJD/qeRVRi2df+jmbea2HE2QJKtBznwI3nip2BVYGfUbVojHpvwyPwNGAzHsF6Ziv cRcBHGUuZEXtJwa7XgLxzldXs5meoSA6Z2DRzjMDeLf5rbs/Ct4zNLmL57A6Qgnh0ZkF 6nbiUAew/DE6JVhyNOWZsuUGhOF8no+mKo4QrpPmDWzKoygMCitdGGjTUFWG+5gQq0Sz qd5A== X-Forwarded-Encrypted: i=1; AL+hErFRnA24Hk7eBoVNiE8FMKtOC5Oa/2IReAzmuAEeMYOjTZc/ZlEf3aGj1j92HkIE2gv0biEtrkAASCI=@lists.infradead.org X-Gm-Message-State: APuU4Z+AiyElkMv2qd7HK+db6g/sg8OSPsmxMAOv38f/cY15wJyYPh81 J80OVva0s9w9E/VlPSHUyyZXx7shYBeDpKtuX6w59bc+o1V2kKroBSmRz247JiG4OKalh8sK1Ck snyiBnsf5HJArGKH8Z972rY73QrzfWC+2mdvVk+p4LCGwCxOkVmzFI3U8sjM= X-Archived-By: MIME-Version: 1.0 X-Received: by 2002:a05:6808:4fe3:b0:572:a102:ad54 with SMTP id 5614622812f47-57a0bb79bdemr40599707b6e.40.1796074502329; Mon, 30 Nov 2026 13:35:02 -0800 (PST) Date: Mon, 30 Nov 2026 13:35:02 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b0dec06.8ccee5ca.1045fd.031e.GAE@google.com> Subject: [syzbot] [jffs2?] kernel BUG in __jffs2_dbg_acct_sanity_check_nolock From: syzbot To: dwmw2@infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, richard@nod.at, syzkaller-bugs@googlegroups.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_133504_726950_76A4D0B6 X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: -0.7 (/) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hello, syzbot found the following issue on: HEAD commit: 4f069ab1ec24 Merge tag 'scsi-fixes' of git://git.kernel.or.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15eb98cd580000 kernel config: https://syzkaller.appspot.com/x/.config?x=d101084bd46d029c dashboard link: https://syzkaller.appspot.com/bug?extid=93e9646c481467ffdf33 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/67ba0886e1c6/disk-4f069ab1.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/32b7a2fbdce1/vmlinux-4f069ab1.xz kernel image: https://storage.googleapis.com/syzbot-assets/5c78c8a5f337/bzImage-4f069ab1.xz The issue was bisected by AI to: commit 7807ef7ba2a41c05f6197381f572dd38baa6c1ce Author: David Woodhouse Date: Sun May 21 02:45:27 2006 +0000 [JFFS2] Fix summary handling of unknown but compatible nodes. reasoning: https://syzkaller.appspot.com/ai_job?id=53e8b2ef-21fa-41ad-819f-e75603353fed AI-generated root cause summary: In `jffs2_sum_process_sum_data()` (`fs/jffs2/summary.c`), when an eraseblock summary contains `REF_UNCHECKED` entries followed by an unsupported compatible node type (`default:` branch), the fallback-to-full-scan rollback restores `c->free_size` by `c->sector_size - jeb->free_size` and subtracts `jeb->wasted_size`, `jeb->used_size`, and `jeb->dirty_size` from the superblock counters, but forgets to subtract `jeb->unchecked_size` from `c->unchecked_size` or reset `jeb->unchecked_size = 0`. This leaves both `c->unchecked_size` and `jeb->unchecked_size` inflated by the previously scanned unchecked nodes (`0x0b60` bytes in this report, making the superblock sum `0x020b60 != 0x020000`). Because `jffs2_dbg_acct_paranoia_check_nolock()` is disabled when `CONFIG_JFFS2_FS_DEBUG=0`, scanning completes silently until `jffs2_build_xattr_subsystem()` later finds a corrupted xref node in another eraseblock and calls `jffs2_mark_node_obsolete()`, which invokes `__jffs2_dbg_acct_sanity_check_nolock()` (`fs/jffs2/debug.c:47`) and hits `BUG()`. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=93e9646c481467ffdf33 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+93e9646c481467ffdf33@syzkaller.appspotmail.com The bisection result may be wrong. If you agree with it, please also add: Fixes: 7807ef7ba2a4 ("[JFFS2] Fix summary handling of unknown but compatible nodes.") jffs2: error: (10291) verify_xattr_ref: node CRC failed at 0x014c90, read=0xf5b51bf7, calc=0xc505f375 jffs2: error: (10291) __jffs2_dbg_acct_sanity_check_nolock: eeep, space accounting superblock info is screwed. jffs2: error: (10291) __jffs2_dbg_acct_sanity_check_nolock: free 0x003b9c + dirty 0x009000 + used 0x003828 + erasing 0x000000 + bad 0x000000 + wasted 0x00001c + unchecked 0x010780 != total 0x020000. ------------[ cut here ]------------ kernel BUG at fs/jffs2/debug.c:47! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 10291 Comm: syz.0.954 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 RIP: 0010:__jffs2_dbg_acct_sanity_check_nolock.cold+0x409/0x540 fs/jffs2/debug.c:47 Code: 00 42 54 8c 8b 44 24 08 48 c7 c7 40 41 54 8c 50 8b 44 24 18 50 8b 44 24 38 50 8b 44 24 38 50 44 8b 4c 24 38 e8 1f ad f8 ff 90 <0f> 0b e8 b7 c1 5f 01 e9 1d fc ff ff 4c 89 e7 89 4c 24 20 e8 a6 c1 RSP: 0018:ffffc900052df7f8 EFLAGS: 00010282 RAX: 00000000000000c6 RBX: ffff888038134000 RCX: 0000000000000000 RDX: 00000000000000c6 RSI: ffffffff81ec5519 RDI: fffff52000a5bef0 RBP: ffff88803813416c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000200 R11: 0000000000000001 R12: 0000000000009000 R13: ffff88803560abc0 R14: ffff88803560a580 R15: 0000000000020000 FS: 00007f906e8176c0(0000) GS:ffff88812245c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa593cade14 CR3: 00000000764eb000 CR4: 00000000003526f0 Call Trace: jffs2_mark_node_obsolete+0x37b/0x1330 fs/jffs2/nodemgmt.c:682 jffs2_build_xattr_subsystem.cold+0xcf/0x229 fs/jffs2/xattr.c:800 jffs2_build_filesystem fs/jffs2/build.c:214 [inline] jffs2_do_mount_fs+0x16a8/0x22f0 fs/jffs2/build.c:416 jffs2_do_fill_super+0x3d4/0xa60 fs/jffs2/fs.c:574 jffs2_fill_super+0x283/0x370 fs/jffs2/super.c:290 mtd_get_sb+0x2f9/0x4d0 drivers/mtd/mtdsuper.c:59 mtd_get_sb_by_nr drivers/mtd/mtdsuper.c:90 [inline] get_tree_mtd+0x6f9/0x8a0 drivers/mtd/mtdsuper.c:143 vfs_get_tree+0x92/0x320 fs/super.c:1881 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount fs/namespace.c:3986 [inline] path_mount+0x7d0/0x2850 fs/namespace.c:4337 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4563 [inline] __se_sys_mount fs/namespace.c:4540 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f906d9a9b59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f906e817028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f906dc35fa0 RCX: 00007f906d9a9b59 RDX: 0000200000000600 RSI: 00002000000005c0 RDI: 0000200000000580 RBP: 00007f906da3a18b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000800000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f906dc36038 R14: 00007f906dc35fa0 R15: 00007ffedc9d04a8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__jffs2_dbg_acct_sanity_check_nolock.cold+0x409/0x540 fs/jffs2/debug.c:47 Code: 00 42 54 8c 8b 44 24 08 48 c7 c7 40 41 54 8c 50 8b 44 24 18 50 8b 44 24 38 50 8b 44 24 38 50 44 8b 4c 24 38 e8 1f ad f8 ff 90 <0f> 0b e8 b7 c1 5f 01 e9 1d fc ff ff 4c 89 e7 89 4c 24 20 e8 a6 c1 RSP: 0018:ffffc900052df7f8 EFLAGS: 00010282 RAX: 00000000000000c6 RBX: ffff888038134000 RCX: 0000000000000000 RDX: 00000000000000c6 RSI: ffffffff81ec5519 RDI: fffff52000a5bef0 RBP: ffff88803813416c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000200 R11: 0000000000000001 R12: 0000000000009000 R13: ffff88803560abc0 R14: ffff88803560a580 R15: 0000000000020000 FS: 00007f906e8176c0(0000) GS:ffff88812245c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa593cade14 CR3: 00000000764eb000 CR4: 00000000003526f0 --- 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. For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title 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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/