lib/test: use after free in register_test_dev_kmod()
stable inclusion from stable-v5.10.110 commit 327f07e3704c821ce33e54ef5046bdf69975cb86 bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=327f07e3704c821ce33e54ef5046bdf69975cb86 -------------------------------- [ Upstream commit dc0ce6cc ] The "test_dev" pointer is freed but then returned to the caller. Fixes: d9c6a72d ("kmod: add test driver to stress test the module loader") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLuis Chamberlain <mcgrof@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYu Liao <liaoyu15@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录