+10
−12
Loading
stable inclusion from stable-v5.10.231 commit 35360255ca30776dee34d9fa764cffa24d0a5f65 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBEAPG CVE: CVE-2024-56600 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35360255ca30776dee34d9fa764cffa24d0a5f65 -------------------------------- [ Upstream commit 9df99c395d0f55fb444ef39f4d6f194ca437d884 ] sock_init_data() attaches the allocated sk pointer to the provided sock object. If inet6_create() fails later, the sk object is released, but the sock object retains the dangling sk pointer, which may cause use-after-free later. Clear the sock sk pointer on error. Signed-off-by:Ignat Korchagin <ignat@cloudflare.com> Reviewed-by:
Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by:
Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241014153808.51894-8-ignat@cloudflare.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Dong Chenchen <dongchenchen2@huawei.com>