+12
−2
Loading
stable inclusion from stable-v6.6.80 commit 940d15254d2216b585558bcf36312da50074e711 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBSW0X CVE: CVE-2025-21856 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=940d15254d2216b585558bcf36312da50074e711 -------------------------------- [ Upstream commit 915e34d5ad35a6a9e56113f852ade4a730fb88f0 ] According to device_release() in /drivers/base/core.c, a device without a release function is a broken device and must be fixed. The current code directly frees the device after calling device_add() without waiting for other kernel parts to release their references. Thus, a reference could still be held to a struct device, e.g., by sysfs, leading to potential use-after-free issues if a proper release function is not set. Fixes: 8c81ba20 ("net/smc: De-tangle ism and smc device initialization") Reviewed-by:Alexandra Winter <wintera@linux.ibm.com> Reviewed-by:
Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by:
Julian Ruess <julianr@linux.ibm.com> Signed-off-by:
Alexandra Winter <wintera@linux.ibm.com> Reviewed-by:
Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250214120137.563409-1-wintera@linux.ibm.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Liu Kai <liukai284@huawei.com>