CVE-2024-56641: net/smc: initialize close_work early to avoid warning
In the Linux kernel, the following vulnerability has been resolved:
net/smc: initialize closework early to avoid warning
We encountered a warning that closework was canceled before initialization.
WARNING: CPU: 7 PID: 111103 at kernel/workqueue.c:3047 flushwork+0x19e/0x1b0 Workqueue: events smclgrterminatework [smc] RIP: 0010:flushwork+0x19e/0x1b0 Call Trace: ? wakeupcommon+0x7a/0x190 ? workbusy+0x80/0x80 cancelworktimer+0xe3/0x160 smcclosecancelwork+0x1a/0x70 [smc] smccloseactiveabort+0x207/0x360 [smc] smclgrterminate.part.38+0xc8/0x180 [smc] processonework+0x19e/0x340 workerthread+0x30/0x370 ? processonework+0x340/0x340 kthread+0x117/0x130 ? kthreadcancelwork+0x50/0x50 retfromfork+0x22/0x30
This is because when smcclosecancelwork is triggered, e.g. the RDMA driver is rmmod and the LGR is terminated, the conn->closework is flushed before initialization, resulting in WARNON(!work->func).
smclgrterminate | smcconnect{rdma|ism} ------------------------------------------------------------- | smcconncreate | \- smclgrregisterconn for conn in lgr->connsall | \- smcconnkill | \- smccloseactiveabort | \- smcclosecancelwork | \- cancelworksync | \- flushwork | (closework) | | smccloseinit | \- INITWORK(&closework)
So fix this by initializing closework before establishing the connection.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch net/smc: initialize close_work early to avoid warning
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56641?
The severity of CVE-2024-56641 is considered to be low as it relates to a warning rather than a security exploit.
How do I fix CVE-2024-56641?
To fix CVE-2024-56641, update your Linux kernel to the latest version where this issue has been resolved.
What versions of the Linux kernel are affected by CVE-2024-56641?
CVE-2024-56641 affects various versions of the Linux kernel prior to the patch that addresses this issue.
What systems are impacted by CVE-2024-56641?
Any system running an affected version of the Linux kernel may experience warnings related to this vulnerability.
What type of issue does CVE-2024-56641 address?
CVE-2024-56641 addresses a programming issue in the Linux kernel that may lead to a warning during operation.