CVE-2026-31613: smb: client: fix OOB reads parsing symlink error response

Published Apr 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix OOB reads parsing symlink error response

When a CREATE returns STATUSSTOPPEDONSYMLINK, smb2checkmessage() returns success without any length validation, leaving the symlink parsers as the only defense against an untrusted server.

symlinkdata() 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.

smb2parsesymlinkresponse() then bounds-checks the substitute name using SMB2SYMLINKSTRUCTSIZE as the offset of PathBuffer from iovbase. That value is computed as sizeof(smb2errrsp) + sizeof(smb2symlinkerrrsp), 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 iovlen. 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 suboffs and sublen are 16bits, the pointer math will not overflow here with the new greater-than.

Affected Software

4 affected components
Linux Linux kernel
Linux Linux kernel>=6.1<6.18.24
Linux Linux kernel>=6.19<6.19.14
Linux Linux kernel>=7.0<7.0.1

Event History

Apr 24, 2026
CVE Published
via MITRE·02:42 PM
Data Sourced
via MITRE·02:42 PM
DescriptionSeverity
Data Sourced
via Red Hat·03:03 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-31613?

CVE-2026-31613 is classified as a high severity vulnerability due to the potential for out-of-bounds reads.

2

How do I fix CVE-2026-31613?

To fix CVE-2026-31613, update the Linux kernel to a version that is not affected, ideally to the latest stable release.

3

What impact does CVE-2026-31613 have on system security?

CVE-2026-31613 can lead to information disclosure or arbitrary code execution due to improper error handling in the SMB client.

4

Which versions of the Linux kernel are affected by CVE-2026-31613?

CVE-2026-31613 affects Linux kernel versions between 6.1 and 6.18.24, as well as 6.19 and 7.0.1.

5

Is there a workaround for CVE-2026-31613?

There is no official workaround for CVE-2026-31613 other than updating to a patched version of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203