commit | fd95bb02e0fbed1852fcd746eee736a187c7cdd5 | [log] [tgz] |
---|---|---|
author | Chengfeng Ye <cyeaa@connect.ust.hk> | Fri Nov 05 06:45:07 2021 -0700 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Thu Jan 27 08:47:37 2022 +0100 |
tree | 1cadb00cb00709050fdbae4f3496a7711a2e708f | |
parent | 0e2705a3f9b7190fabc068bd3db687032c1a589c [diff] |
HSI: core: Fix return freed object in hsi_new_client [ Upstream commit a1ee1c08fcd5af03187dcd41dcab12fd5b379555 ] cl is freed on error of calling device_register, but this object is return later, which will cause uaf issue. Fix it by return NULL on error. Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Sasha Levin <sashal@kernel.org>