CVE-2026-143043: smb: client: fix out-of-bounds read in dfs_parse_target_referral()

Published Dec 3, 2026
·
Updated

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

smb: client: fix out-of-bounds read in dfsparsetargetreferral()

dfsparsetargetreferral() decides whether a prefix path remains after the consumed part of fullpath with:

if (strlen(fullpath) - ref->pathconsumed)

strlen() returns sizet, so if pathconsumed is larger than the length of fullpath, the subtraction wraps around to a huge non-zero value. The branch is then taken, prepath is set to a pointer past the terminating NUL of fullpath, and prepath reads out of bounds.

pathconsumed can exceed strlen(fullpath) when the mount charset is not utf8. The referral code derives pathconsumed from the canonical path, which is in the DFS cache charset (utf8), but it is applied here to fullpath, which is in the mount charset. Each non-ASCII character in the consumed part of the path that is longer in utf8 than in the mount charset makes the count too large by the difference.

This was reproduced with iocharset=iso8859-1 against a Samba DFS root containing a link named "café", mounting with the single Latin-1 byte 0xe9 in the path. On an unmodified tree such a mount fails earlier with -ENOENT because the path is converted to utf8 twice in setupdfsref(); with that fixed ("smb: client: fix double conversion of DFS path in setupdfsref()"), the mount reaches this code. fullpath was 29 bytes while pathconsumed was 30:

BUG: KASAN: slab-out-of-bounds in dfsparsetargetreferral+0x26a/0x270 Read of size 1 at addr ffff88810db89d5f by task mount/1743 ... The buggy address is located 0 bytes to the right of allocated 31-byte region [ffff88810db89d40, ffff88810db89d5f)

Compare pathconsumed against the string length instead of subtracting, so that no prefix path is used when the consumed count covers the whole string. With the bounds check in place the same mount succeeds and no KASAN report is produced.

This only prevents the out-of-bounds access. pathconsumed is still in the wrong units, so a non-ASCII link followed by a path component can still produce a wrong prefix path. That needs a separate fix.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In dfs_parse_target_referral(), compare path_consumed against the length of full_path before using prepath; do not subtract path_consumed from strlen(full_path). Treat the consumed path as covering the whole path when path_consumed is at least the string length, so no prefix path is used.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:18 AM
Data Sourced
via MITRE·09:18 AM
Description

Frequently Asked Questions

1

Which SMB client mounts are exposed to this issue?

The affected path is DFS referral processing on Linux SMB client mounts that use a charset other than UTF-8. Exposure requires non-ASCII characters in the consumed portion of a DFS path where the UTF-8 representation is longer than the mount-charset representation.

2

What configuration can reduce exposure if a kernel update cannot be applied immediately?

Use a UTF-8 mount charset where possible. The mismatch occurs because the referral code counts bytes in UTF-8 but applies that count to a path encoded in the mount charset.

3

How can I identify mounts that may be affected?

Review SMB DFS mounts for a non-UTF-8 iocharset and DFS paths or link names containing non-ASCII characters. The reported reproduction used iocharset=iso8859-1 and a Samba DFS link named "café".

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