CVE-2024-42256: cifs: Fix server re-repick on subrequest retry
In the Linux kernel, the following vulnerability has been resolved:
cifs: Fix server re-repick on subrequest retry
When a subrequest is marked for needing retry, netfs will call
cifs_prepare_write() which will make cifs repick the server for the op
before renegotiating credits; it then calls cifs_issue_write() which
invokes smb2_async_writev() - which re-repicks the server.
If a different server is then selected, this causes the increment of
server->in_flight to happen against one record and the decrement to happen
against another, leading to misaccounting.
Fix this by just removing the repick code in smb2_async_writev(). As this
is only called from netfslib-driven code, cifs_prepare_write() should
always have been called first, and so server should never be NULL and the
preparatory step is repeated in the event that we do a retry.
The problem manifests as a warning looking something like:
WARNING: CPU: 4 PID: 72896 at fs/smb/client/smb2ops.c:97 smb2_add_credits+0x3f0/0x9e0 [cifs]
...
RIP: 0010:smb2_add_credits+0x3f0/0x9e0 [cifs]
...
smb2_writev_callback+0x334/0x560 [cifs]
cifs_demultiplex_thread+0x77a/0x11b0 [cifs]
kthread+0x187/0x1d0
ret_from_fork+0x34/0x60
ret_from_fork_asm+0x1a/0x30
Which may be triggered by a number of different xfstests running against an
Azure server in multichannel mode. generic/249 seems the most repeatable,
but generic/215, generic/249 and generic/308 may also show it.
Security readout for executives and security teams
Plain-English summary
A Linux CIFS/SMB client accounting flaw can mishandle in-flight writes when a retried subrequest switches servers. The resulting inconsistency can trigger kernel warnings and potentially disrupt availability. Systems using affected kernels for SMB storage, particularly multichannel Azure configurations, deserve prompt review.
Executive priority
Treat as a high-priority availability issue for affected SMB-dependent systems, especially production storage clients using multichannel. Accelerate kernel validation and patching where interruption would affect critical services. Broader emergency action is not supported because active exploitation is unconfirmed.
Technical view
During a netfslib write retry, CIFS selected a server in cifs_prepare_write(), then selected again in smb2_async_writev(). If selections differed, server->in_flight was incremented and decremented on different records. The upstream resolution removes the second selection. Testing reproduced warnings during several xfstests against Azure SMB in multichannel mode.
Likely exposure
The supplied record identifies Linux 6.10 through 6.10.1 and 6.11 as affected. Practical exposure requires CIFS/SMB client write activity and the retry path; multichannel Azure testing reproduced the issue. The sources do not establish whether every listed kernel configuration is equally exposed.
Exploitation context
CVSS 3.1 rates this 7.5 for availability impact, but the supplied sources describe test-triggered kernel warnings, not a demonstrated attack. The record is not in KEV, and no cited evidence supports active exploitation, public weaponization, confidentiality loss, or data modification.
Researcher notes
The disclosed failure is cross-record in-flight accounting caused by duplicate server selection during retry handling. The supplied material demonstrates a warning under xfstests, but does not document panic frequency, denial-of-service reliability, a hostile trigger, or exact fixed release versions. Validate fixes by commit inclusion or distribution guidance.
Mitigation direction
Upgrade to a vendor-supported kernel release incorporating the cited upstream fix.
Confirm the distribution kernel package includes the applicable stable-kernel correction.
Review current Linux vendor guidance before applying configuration-based workarounds.
Prioritize SMB clients using multichannel or Azure-hosted SMB storage.
Validation and detection
Inventory Linux kernel versions on systems mounting CIFS or SMB shares.
Identify clients using SMB multichannel, especially with Azure-hosted servers.
Verify the installed kernel contains the applicable cited stable commit.
Search kernel logs for warnings originating from smb2_add_credits or smb2_writev_callback.
Retest representative SMB write and retry workloads after updating.
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.
cve · low confidence lookup
CVE-2024-42256 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
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.