[syzbot] [jfs?] [fat?] general protection fault in txEnd

Rafael Alejandro Diaz Cruz
2026-03-30T21:15:20Z

[-- Attachment #1: Type: text/plain, Size: 10 bytes --]

#syz test

[-- Attachment #2: 0001-jfs-prevent-null-log-deference-from-superblock-durin.patch --]
[-- Type: text/x-diff, Size: 972 bytes --]

From f5d32d2cad197e1cd5e335ec85490bda11aec429 Mon Sep 17 00:00:00 2001
From: rafad900 <19312533+rafad900@users.noreply.github.com>
Date: Mon, 30 Mar 2026 13:33:13 -0700
Subject: [PATCH] jfs: prevent null log deference from superblock during
read only mode Clearing the inode pointer is necessary to ensure no memory
leaks after txBegin fails to initialize the superblock during read only mode.

Signed-off-by: rafad900 <19312533+rafad900@users.noreply.github.com>
---
fs/jfs/namei.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 25b303276b82..6d5a1f8f72ab 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -99,6 +99,9 @@ static int jfs_create(struct mnt_idmap *idmap, struct inode *dip,
tid = txBegin(dip->i_sb, 0);
if (tid == 0) {
jfs_err("jfs_create: unable to create tblk due to read only filesystem");
+ free_ea_wmap(ip);
+ clear_nlink(ip);
+ discard_new_inode(ip);
return -EROFS;
}

--
2.43.0