CVE-2026-31613
smb: client: fix OOB reads parsing symlink error response
Check your servers for CVE-2026-31613
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31613 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix OOB reads parsing symlink error response
When a CREATE returns STATUS_STOPPED_ON_SYMLINK, smb2_check_message() returns success without any length validation, leaving the symlink parsers as the only defense against an untrusted server.
symlink_data() walks SMB 3.1.1 error contexts with the loop test "p < end", but reads p->ErrorId at offset 4 and p->ErrorDataLength at offset 0. When the server-controlled ErrorDataLength advances p to within 1-7 bytes of end, the next iteration will read past it. When the matching context is found, sym->SymLinkErrorTag is read at offset 4 from p->ErrorContextData with no check that the symlink header itself fits.
smb2_parse_symlink_response() then bounds-checks the substitute name using SMB2_SYMLINK_STRUCT_SIZE as the offset of PathBuffer from iov_base. That value is computed as sizeof(smb2_err_rsp) + sizeof(smb2_symlink_err_rsp), which is correct only when ErrorContextCount == 0.
With at least one error context the symlink data sits 8 bytes deeper, and each skipped non-matching context shifts it further by 8 + ALIGN(ErrorDataLength, 8). The check is too short, allowing the substitute name read to run past iov_len. The out-of-bound heap bytes are UTF-16-decoded into the symlink target and returned to userspace via readlink(2).
Fix this all up by making the loops test require the full context header to fit, rejecting sym if its header runs past end, and bound the substitute name against the actual position of sym->PathBuffer rather than a fixed offset.
Because sub_offs and sub_len are 16bits, the pointer math will not overflow here with the new greater-than.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.40%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 36.5% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 16 Oct 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-125 Out-of-bounds Read
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 76894f3e2f71177747b8b4763fb180e800279585, before 043834e72337ee7b4e9685859888623ba1504ac7 affected from 76894f3e2f71177747b8b4763fb180e800279585, before d65a64755a3df68a2fd19d2a81395e9f723aca23 affected from 76894f3e2f71177747b8b4763fb180e800279585, before 20ac98f0eb6047edb73c9a27af782bdde08b3757 affected from 76894f3e2f71177747b8b4763fb180e800279585, before e0dd90d14cbbf318157ea8e3fb62ee68a28655ed affected from 76894f3e2f71177747b8b4763fb180e800279585, before 781902e069f4ecb6c3b83502f181972c1446110a affected from 76894f3e2f71177747b8b4763fb180e800279585, before a66ef2e7ed837325c5600f8617d5ee0a0a149fdd affected from 76894f3e2f71177747b8b4763fb180e800279585, before 3df690bba28edec865cf7190be10708ad0ddd67e affected 2d046892a493d9760c35fdaefc3017f27f91b621 affected from 6.0.16, before 6.1
Other versions: unaffected
|
| Linux |
affected 6.1 unaffected before 6.1 unaffected from 6.1.175 up to and including 6.1.* unaffected from 6.6.141 up to and including 6.6.* unaffected from 6.12.91 up to and including 6.12.* unaffected from 6.18.24 up to and including 6.18.* unaffected from 6.19.14 up to and including 6.19.* unaffected from 7.0.1 up to and including 7.0.* unaffected 7.1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31613 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31613
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31613
trivy image --scanners vuln IMAGE | grep CVE-2026-31613
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/043834e72337ee7b4e9685859888623ba1504ac7 git.kernel.org
- https://git.kernel.org/stable/c/d65a64755a3df68a2fd19d2a81395e9f723aca23 git.kernel.org
- https://git.kernel.org/stable/c/20ac98f0eb6047edb73c9a27af782bdde08b3757 git.kernel.org
- https://git.kernel.org/stable/c/e0dd90d14cbbf318157ea8e3fb62ee68a28655ed git.kernel.org
- https://git.kernel.org/stable/c/781902e069f4ecb6c3b83502f181972c1446110a git.kernel.org
- https://git.kernel.org/stable/c/a66ef2e7ed837325c5600f8617d5ee0a0a149fdd git.kernel.org
- https://git.kernel.org/stable/c/3df690bba28edec865cf7190be10708ad0ddd67e git.kernel.org
- https://cert-portal.siemens.com/productcert/html/ssa-784472.html cert-portal.siemens.com
Source: the record CVE-2026-31613 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse