Look up another CVE · open CVE-2024-56641 in the interactive tracker
CVE-2024-56641
net/smc: initialize close_work early to avoid warning
Published 2024-12-27 (22 months ago) by the Linux kernel CNA. Subsystem net/smc. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-56641 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.5-1 | Update the kernel and reboot. Fixed in 6.12.5-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.5-1 | Update the kernel and reboot. Fixed in 6.12.5-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.5-1 | Update the kernel and reboot. Fixed in 6.12.5-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
We encountered a warning that close_work was canceled before initialization. WARNING: CPU: 7 PID: 111103 at kernel/workqueue.c:3047 __flush_work+0x19e/0x1b0 Workqueue: events smc_lgr_terminate_work [smc] RIP: 0010:__flush_work+0x19e/0x1b0 Call Trace: ? __wake_up_common+0x7a/0x190 ? work_busy+0x80/0x80 __cancel_work_timer+0xe3/0x160 smc_close_cancel_work+0x1a/0x70 [smc] smc_close_active_abort+0x207/0x360 [smc] __smc_lgr_terminate.part.38+0xc8/0x180 [smc] process_one_work+0x19e/0x340 worker_thread+0x30/0x370 ? process_one_work+0x340/0x340 kthread+0x117/0x130 ? __kthread_cancel_work+0x50/0x50 ret_from_fork+0x22/0x30 This is because when smc_close_cancel_work is triggered, e.g. the RDMA driver is rmmod and the LGR is terminated, the conn->close_work is flushed before initialization, resulting in WARN_ON(!work->func). __smc_lgr_terminate | smc_connect_{rdma|ism} ------------------------------------------------------------- | smc_conn_create | \- smc_lgr_register_conn for conn in lgr->conns_all | \- smc_conn_kill | \- smc_close_active_abort | \- smc_close_cancel_work | \- cancel_work_sync | \- __flush_work | (close_work) | | smc_close_init | \- INIT_WORK(&close_work) So fix this by initializing close_work before establishing the connection.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
net/smc/af_smc.c
- What this is
- SHARED MEMORY COMMUNICATIONS (SMC) SOCKETSMAINTAINERS section matched on net/smc/ · linux-rdma@vger.kernel.org · Supported
- Kernel module
- smc
Check it on the machine
grep -w CONFIG_SMC /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w smcPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian does not build this code in 2 releases. It does build it in 2 releases, so the answer depends on which release the machine runs.
- bookworm, trixiem
- forky, sidn
- m
- a loadable module on every flavour - check lsmod, can be blacklisted
- n
- not enabled on any flavour - this release does not build the code
- Build switch
- CONFIG_SMC
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-12-27 (22 months ago)source
- CVSS
- 7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:Hsource recompute it - Attack vector
- network (AV:N)source
- EPSS
- 0.52%, higher than 42.6% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- net/smc
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 4.12 | 6.6.66 | f0c37002210a |
| 4.12 | 6.12.5 | 6638e52dcfaf |
| 4.12 | 6.13 | 0541db8ee32c |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:NAttack vector, network
- The affected code is the SMC (Shared Memory Communications) protocol connect path, driven entirely by a remote peer's CLC/LLC messages, and the racing link-group teardown is itself triggerable by peer-sent LLC DELETE_LINK(ALL), LLC protocol violations, or a CLC DECLINE with the first-contact flag. No local access to the target is required for the attacking peer.
- AC:LAttack complexity, low
- The remote peer controls both sides of the race — it dictates when the client executes smc_conn_create() by timing its CLC Accept reply, and it can force __smc_lgr_terminate() at will via an LLC DELETE_LINK ALL or protocol violation — and it can retry across the many connections an LGR multiplexes until the window is hit.
- PR:NPrivileges required, none
- SMC performs no authentication of its own; a peer completing the ordinary TCP/CLC handshake needs no credentials or privileges on the target system. Locally, AF_SMC socket creation also has no capability check in smc_create()/__smc_create().
- UI:NUser interaction, none
- The condition is hit during normal, automatic SMC connection establishment and link-group termination handling; no victim action such as opening a file or mounting anything is needed.
- S:UScope, unchanged
- The warning and any resulting panic occur in the kernel's own SMC/workqueue context, with no crossing of a virtualization, IOMMU, or other security-authority boundary.
- C:NConfidentiality impact, none
- __flush_work() returns immediately at WARN_ON(!work->func) without dereferencing or exposing any data; there is no out-of-bounds read, uninitialized-memory disclosure, or pointer leak beyond the standard splat.
- I:NIntegrity impact, none
- No memory is corrupted — close_work is zero-initialized and was never queued, so the aborted cancel leaves no dangling state and provides no write primitive or control-flow influence.
- A:HAvailability impact, high
- The WARN_ON is a kernel warning raised from the smc_lgr_terminate_work worker, which panics the system outright on the widely deployed panic_on_warn=1 configuration and can be triggered repeatedly by the peer, yielding a remote denial of service.