]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Sun, 15 Dec 2024 07:27:20 +0000 (16:27 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:01 +0000 (12:50 +0100)
commitb467ed29b58624add3c211fe89818240278e8275
treed3fc23a37a3594a0d01d993e3bf0b52222d4e5af
parent778a73f8d38dee4151ed72fcc83ef339dabf3934
crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()

[ Upstream commit 472a989029aac2b78ef2f0b18b27c568bf76d104 ]

init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multiple
times, but does not release all the obtained refcounts. Fix it by adding
of_node_put() calls.

This bug was found by an experimental static analysis tool that I am
developing.

Fixes: 76f24b4f46b8 ("crypto: ixp4xx - Add device tree support")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ixp4xx_crypto.c