CVE-2024-42256
published high CVSS 3.1 · 7.5cifs: Fix server re-repick on subrequest retry
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux3ee1a1fc39819906f04d6c62c180e760cd3a689d to < b1d0a566769b6fb3795b5289fc1daf9e0638d97a · 3ee1a1fc39819906f04d6c62c180e760cd3a689d to < de40579b903883274fe203865f29d66b168b7236 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.10 (affected) · 0 to < 6.10 (unaffected · semver) · 6.10.1 through 6.10.* (unaffected · semver) · 6.11 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Scenarios
- en: AV:N - The trigger is the SMB write-retry path, and retries are dictated entirely by the remote SMB server's responses (`MID_REQUEST_SUBMITTED` on connection drop, or any `is_replayable_error()` status) reaching the client over TCP/445. A malicious/compromised server or an on-path attacker can force the retry at will. AC:L - The remote server can deterministically and repeatedly force write retries by returning replayable errors or dropping a channel's connection, and `cifs_pick_channel()` will select a different channel; there is no race or memory-layout condition outside the attacker's control. PR:N - The attacker is the remote SMB peer (or an on-path attacker) and needs no credentials or privileges on the victim client; the bug is hit during ordinary writeback on an already-established session. UI:N - The CIFS multichannel mount is a pre-existing environmental condition (fstab/autofs/cloud VM Azure Files mount), and at exploit time no victim action is required — ongoing background writeback is sufficient to enter the retry path. S:U - The credit and `in_flight` misaccounting is confined to the `TCP_Server_Info` structures of the client kernel's own CIFS session; no security boundary such as a VM or IOMMU domain is crossed. C:N - The defect is purely counter/credit misaccounting on the wrong channel record; tracing every use of `in_flight` and `server->credits` shows they index no memory and yield no read primitive or information disclosure. I:N - No memory is written out of bounds and no file data is altered — the write payload itself is transmitted correctly, only the per-channel credit and in-flight bookkeeping diverges. A:H - The bug reaches `WARN_ON_ONCE(server->in_flight == 0)` followed by an unsigned-integer underflow of `in_flight` to `UINT_MAX` (a kernel panic under `panic_on_warn`), and the permanently leaked credits on the original channel make `smb2_wait_mtu_credits()`'s untimed `wait_event_killable()` block forever, wedging the mount and stalling writeback indefinitely.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 3ee1a1fc39819906f04d6c62c180e760cd3a689d to < b1d0a566769b6fb3795b5289fc1daf9e0638d97a (affected · git)3ee1a1fc39819906f04d6c62c180e760cd3a689d to < de40579b903883274fe203865f29d66b168b7236 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.10 (affected)0 to < 6.10 (unaffected · semver)6.10.1 through 6.10.* (unaffected · semver)6.11 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
2Linux · cna
cifs: Fix server re-repick on subrequest retry
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- b503ed7827f95d17c843944f0e9eeb0c0cb549fbc830f790a4bd440ec6970f40
- Ingested
- 23 Sep 2026, 08:26:31 UTC
- Source record
- Official CVE record