Files
linux/fs/hfs
Dan Carpenter 40a1e01420 hfs: fix potential use after free in hfs_correct_next_unused_CNID()
[ Upstream commit c105e76bb1 ]

This code calls hfs_bnode_put(node) which drops the refcount and then
dreferences "node" on the next line.  It's only safe to use "node"
when we're holding a reference so flip these two lines around.

Fixes: a06ec283e1 ("hfs: add logic of correcting a next unused CNID")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/aN-Xw8KnbSnuIcLk@stanley.mountain
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-12-18 14:02:52 +01:00
..
2023-10-09 16:24:19 +02:00
2023-08-02 09:13:09 -06:00
2022-12-11 19:30:19 -08:00