CVE-2024-56640: net/smc: fix LGR and link use-after-free issue
In the Linux kernel, the following vulnerability has been resolved:
net/smc: fix LGR and link use-after-free issue
We encountered a LGR/link use-after-free issue, which manifested as
the LGR/link refcnt reaching 0 early and entering the clear process,
making resource access unsafe.
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 14 PID: 107447 at lib/refcount.c:25 refcount_warn_saturate+0x9c/0x140
Workqueue: events smc_lgr_terminate_work [smc]
Call trace:
refcount_warn_saturate+0x9c/0x140
__smc_lgr_terminate.part.45+0x2a8/0x370 [smc]
smc_lgr_terminate_work+0x28/0x30 [smc]
process_one_work+0x1b8/0x420
worker_thread+0x158/0x510
kthread+0x114/0x118
or
refcount_t: underflow; use-after-free.
WARNING: CPU: 6 PID: 93140 at lib/refcount.c:28 refcount_warn_saturate+0xf0/0x140
Workqueue: smc_hs_wq smc_listen_work [smc]
Call trace:
refcount_warn_saturate+0xf0/0x140
smcr_link_put+0x1cc/0x1d8 [smc]
smc_conn_free+0x110/0x1b0 [smc]
smc_conn_abort+0x50/0x60 [smc]
smc_listen_find_device+0x75c/0x790 [smc]
smc_listen_work+0x368/0x8a0 [smc]
process_one_work+0x1b8/0x420
worker_thread+0x158/0x510
kthread+0x114/0x118
It is caused by repeated release of LGR/link refcnt. One suspect is that
smc_conn_free() is called repeatedly because some smc_conn_free() from
server listening path are not protected by sock lock.
e.g.
Calls under socklock | smc_listen_work
-------------------------------------------------------
lock_sock(sk) | smc_conn_abort
smc_conn_free | \- smc_conn_free
\- smcr_link_put | \- smcr_link_put (duplicated)
release_sock(sk)
So here add sock lock protection in smc_listen_work() path, making it
exclusive with other connection operations.
Security readout for executives and security teams
Plain-English summary
A race condition in Linux's SMC networking code can release connection resources more than once, leaving the kernel accessing freed memory. The supplied CVSS assessment rates potential confidentiality, integrity, and availability impact as critical. Actual organizational risk depends on whether affected kernels use the SMC subsystem.
Executive priority
Prioritize prompt assessment and patching because the supplied severity is critical and the flaw affects kernel memory safety. Focus first on SMC-enabled or SMC-dependent servers. There is no supplied evidence of active exploitation, so emergency incident response is not justified solely by this record.
Technical view
Unprotected calls to smc_conn_free() in the server listening path can duplicate LGR or link reference releases. Reference counts may reach zero prematurely, initiating cleanup while resources remain accessible. The kernel fix adds socket-lock protection in smc_listen_work() so connection cleanup is exclusive with competing operations.
Likely exposure
Potential exposure is limited to Linux systems running affected kernel versions where SMC networking is present and relevant listening activity occurs. The bundle identifies affected Linux versions but does not clearly define complete version ranges or exploitation prerequisites. Confirm exposure against distribution-specific advisories and installed kernel packages.
Exploitation context
The supplied CVSS vector describes remote, low-complexity, unauthenticated exploitation without user interaction. However, the bundle provides no exploit demonstration, attack details, or evidence of active exploitation, and the CVE is not listed as KEV. Treat practical exploitability as unconfirmed.
Researcher notes
CWE-416 applies. The reported failure involves competing cleanup paths calling smc_conn_free() and smcr_link_put(), producing reference-count underflow or addition on zero. The fix serializes smc_listen_work() cleanup with other connection operations using the socket lock. The sources do not establish reliable code-execution behavior or a complete affected-version boundary.
Mitigation direction
Install the applicable vendor-supported kernel update containing the SMC locking fix.
Consult distribution guidance to identify corrected packages for each deployed kernel branch.
Prioritize systems that expose or actively use SMC networking.
Apply normal change controls and reboot if required to activate the updated kernel.
Validation and detection
Inventory installed and running kernel versions across Linux systems.
Determine whether SMC networking is configured or used on potentially affected hosts.
Compare kernel packages with vendor advisories and the referenced stable fixes.
Review kernel logs for SMC-related refcount underflow or addition-on-zero warnings.
After updating, verify systems booted into the corrected kernel.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
2ADP providers
7Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.