[PATCH OLK-6.6 0/2] CVE-2026-46044
CVE-2026-46044 Corey Minyard (2): ipmi:ssif: Clean up kthread on errors ipmi:ssif: NULL thread on error drivers/char/ipmi/ipmi_ssif.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.34.1
From: Corey Minyard <corey@minyard.net> stable inclusion from stable-v6.6.140 commit 07f9bff69da84e462178d3f0ad1b32f19f13ad94 category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/15288 CVE: CVE-2026-46044 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- If an error occurs after the ssif kthread is created, but before the main IPMI code starts the ssif interface, the ssif kthread will not be stopped. So make sure the kthread is stopped on an error condition if it is running. Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)") Reported-by: Li Xiao <<252270051@hdu.edu.cn> Cc: stable@vger.kernel.org Reviewed-by: Li Xiao <252270051@hdu.edu.cn> Signed-off-by: Corey Minyard <corey@minyard.net> (cherry picked from commit 75c486cb1bcaa1a3ec3a6438498176a3a4998ae4) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Conflicts: drivers/char/ipmi/ipmi_ssif.c [Only context conflicts] Signed-off-by: Cai Xinchen <caixinchen1@huawei.com> --- drivers/char/ipmi/ipmi_ssif.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index df8dd50b4cbe..124d51d845e4 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -1273,6 +1273,7 @@ static void shutdown_ssif(void *send_info) if (ssif_info->thread) { complete(&ssif_info->wake_thread); kthread_stop(ssif_info->thread); + ssif_info->thread = NULL; } } @@ -1898,6 +1899,15 @@ static int ssif_probe(struct i2c_client *client) out: if (rv) { + /* + * If ipmi_register_smi() starts the interface, it will + * call shutdown and that will free the thread and set + * it to NULL. Otherwise it must be freed here. + */ + if (ssif_info->thread) { + kthread_stop(ssif_info->thread); + ssif_info->thread = NULL; + } if (addr_info) addr_info->client = NULL; -- 2.34.1
From: Corey Minyard <corey@minyard.net> mainline inclusion from mainline-v7.1-rc3 commit a8aebe93a4938c0ca1941eeaae821738f869be3d category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/15288 CVE: CVE-2026-46044 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... -------------------------------- Cleanup code was checking the thread for NULL, but it was possibly a PTR_ERR() in one spot. Spotted with static analysis. Link: https://sourceforge.net/p/openipmi/mailman/message/59324676/ Fixes: 75c486cb1bca ("ipmi:ssif: Clean up kthread on errors") Cc: <stable@vger.kernel.org> # 91eb7ec72612: ipmi:ssif: Remove unnecessary indention Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard <corey@minyard.net> Conflicts: drivers/char/ipmi/ipmi_ssif.c [Only context conflicts] Signed-off-by: Cai Xinchen <caixinchen1@huawei.com> --- drivers/char/ipmi/ipmi_ssif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 124d51d845e4..e53be7bb7141 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -1870,6 +1870,7 @@ static int ssif_probe(struct i2c_client *client) "kssif%4.4x", thread_num); if (IS_ERR(ssif_info->thread)) { rv = PTR_ERR(ssif_info->thread); + ssif_info->thread = NULL; dev_notice(&ssif_info->client->dev, "Could not start kernel thread: error %d\n", rv); -- 2.34.1
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/23188 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/5KP... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/23188 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/5KP...
participants (2)
-
Cai Xinchen -
patchwork bot