PT-2026-166898
CVE-2026-143043
·
Published
2026-12-03
·
Updated
2026-12-03
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix out-of-bounds read in dfs parse target referral()
dfs parse target referral() decides whether a prefix path remains after
the consumed part of full path with:
if (strlen(full path) - ref->path consumed)strlen() returns size t, so if path consumed is larger than the length
of full path, 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 full path, and *prepath reads out of bounds.
path consumed can exceed strlen(full path) when the mount charset is
not utf8. The referral code derives path consumed from the canonical
path, which is in the DFS cache charset (utf8), but it is applied here
to full path, 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
setup dfs ref(); with that fixed ("smb: client: fix double conversion
of DFS path in setup dfs ref()"), the mount reaches this code.
full path was 29 bytes while path consumed was 30:
BUG: KASAN: slab-out-of-bounds in dfs parse target referral+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 path consumed 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. path consumed 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.
Found an issue in the description? Have something to add? Feel free to write us 👾