From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (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 181613A16A0 for ; Thu, 30 Apr 2026 22:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777588920; cv=none; b=o3ACXSSwZKEUGO21TL8YDaPoQij/KKp22FqhfUbU1OXli1eME1lfP13Z82tdeFAN9TIhEZxNSMiZpxKxwuqI+L+P/xwK78mSg+yHup0R8afGK4gkUYI0sjoDgC6YhMN5mYQfZm15PpZwHZJ8hLx8BMKOeBMfZcTlBaJ2sIZ8WUo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777588920; c=relaxed/simple; bh=EXWjPWxrrCeKnwUVkOjaLrpG3bJrfmSPpT2hdt4MxCI=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=EhUL0IYwQ8YAOP+cQJOlsIX3+AlNW+s/RNVGBU1saJ1X04Y3QFIhpwIdH8MTrNcjz504VwRAqNUbWO0Ux4FPvPi+QWqpK5MZ34zCVviE9aGVGTDxeV7+1U/6pLgRctG6y1865SO2ef7ivE1WOvaFHW6sdyT3Gfci0imr+TJkfdQ= 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.70 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-f70.google.com with SMTP id 006d021491bc7-6949f514496so1574742eaf.1 for ; Thu, 30 Apr 2026 15:41:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777588918; x=1778193718; 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=cb4rGL3bEmi6VroU3rklJfaGwFLTY/MUCpNg7FRQu0U=; b=IdevvARQ1pbD4Q51ZYDGm9uxEJIk70xbV+4CtLTP9N4gVAP83DUK4GxIYrQ7Y+nvrN TxrfB7qnuFJHwei+HiP5/Ax5NeXfwZXcEC3VDZV219Fs26Br36cXdHRq7htKHbOpFBYB 1VMu3O0q55edsOQAZNxwRv4ZxPgHg8suvfbcKlzg913e9BL2/zQ2c14FB4rJUIxL0e6M uE6c7hK0ROSWxRhxN40tE5Ne+tiZXPNHkLcTjwsj1ShJzAc95LmIdc2xzpF6XGXRsX3j bvjX4908w9sLk7Rrtfymw1hBL3PA+Iwhxt0OO1jcDswu0HdsPqD+cjk7NB3JSEaSSDoP p2Qw== X-Gm-Message-State: AOJu0Yz3svwTDUsWcA22BUP28XV9UZaK9Tu/po2kz9ust6/PaUPxFKjI u3ilEeSZwC07OABsrqFut7IxPXAPg6GUs7TduXGMB1uE3mYIhdlYlOh5+PUARQslvTXJgorJz57 VkCiciicWQOdBiLwam53IQrICU0uGaDnwikmb7y4XfapuFj/jgCwx5W0Vekg= 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:824:b0:696:178e:298e with SMTP id 006d021491bc7-6967a4ad549mr2767187eaf.11.1777588918166; Thu, 30 Apr 2026 15:41:58 -0700 (PDT) Date: Thu, 30 Apr 2026 15:41:58 -0700 In-Reply-To: <69decbcf.a00a0220.468cb.0069.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69f3dab6.050a0220.312cd3.0005.GAE@google.com> Subject: Forwarded: Re: [syzbot] [hfsplus?] general protection fault in __hfsplus_setxattr 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: Re: [syzbot] [hfsplus?] general protection fault in __hfsplus_setxattr Author: tristmd@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>From 732ab5800c0f9d429f4896ababfb1bf33cc9abed Mon Sep 17 00:00:00 2001 From: Tristan Madani Date: Thu, 30 Apr 2026 22:40:42 +0000 Subject: [PATCH 3/3] hfsplus: fix null pointer dereference in hfsplus_create_attributes_file hfsplus_create_attributes_file() calls hfsplus_mark_inode_dirty() with HFSPLUS_ATTR_TREE_I(sb) before sbi->attr_tree has been set by hfs_btree_open(). HFSPLUS_ATTR_TREE_I dereferences sbi->attr_tree to reach ->inode, causing a null pointer dereference when attr_tree is still NULL. Move the mark_dirty call to after hfs_btree_open() and guard it with a NULL check on sbi->attr_tree. Reported-by: syzbot+bc70a12e438dadba4fb4@syzkaller.appspotmail.com Fixes: ee8422d00b7c ("hfsplus: fix potential Allocation File corruption after fsync") Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani --- fs/hfsplus/xattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c index 452a1f9becb2d..1ea9f313368c5 100644 --- a/fs/hfsplus/xattr.c +++ b/fs/hfsplus/xattr.c @@ -317,12 +317,13 @@ static int hfsplus_create_attributes_file(struct super_block *sb) next_node++; } - hfsplus_mark_inode_dirty(HFSPLUS_ATTR_TREE_I(sb), HFSPLUS_I_ATTR_DIRTY); hfsplus_mark_inode_dirty(attr_file, HFSPLUS_I_ATTR_DIRTY); sbi->attr_tree = hfs_btree_open(sb, HFSPLUS_ATTR_CNID); if (!sbi->attr_tree) pr_err("failed to load attributes file\n"); + else + hfsplus_mark_inode_dirty(HFSPLUS_ATTR_TREE_I(sb), HFSPLUS_I_ATTR_DIRTY); failed_header_node_init: kfree(buf); -- 2.47.3