]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hfsplus: don't use BUG_ON() in hfsplus_create_attributes_file()
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tue, 15 Jul 2025 05:17:56 +0000 (14:17 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:51 +0000 (16:25 +0200)
commitdee5c668ad71ddbcb4b48d95e8a4f371314ad41d
tree09a703dc04549877dc9496143207fc918fd6ecaf
parent13604b1d7e7b125fb428cddbec6b8d92baad25d5
hfsplus: don't use BUG_ON() in hfsplus_create_attributes_file()

[ Upstream commit c7c6363ca186747ebc2df10c8a1a51e66e0e32d9 ]

When the volume header contains erroneous values that do not reflect
the actual state of the filesystem, hfsplus_fill_super() assumes that
the attributes file is not yet created, which later results in hitting
BUG_ON() when hfsplus_create_attributes_file() is called. Replace this
BUG_ON() with -EIO error with a message to suggest running fsck tool.

Reported-by: syzbot <syzbot+1107451c16b9eb9d29e6@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=1107451c16b9eb9d29e6
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/7b587d24-c8a1-4413-9b9a-00a33fbd849f@I-love.SAKURA.ne.jp
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/hfsplus/xattr.c