CVE-2026-72318 PUBLISHED

cifs: validate DFS referral string offsets

Assigner: Linux
Reserved: 09.08.2026 Published: 15.08.2026 Updated: 17.08.2026

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

cifs: validate DFS referral string offsets

parse_dfs_referrals() validates that the response header and referral array fit in the received buffer, but each referral also contains string offsets supplied by the server.

Those offsets are used to compute the DfsPath and NetworkAddress string pointers without checking whether they still point inside the response buffer. A malformed referral can therefore make the computed pointer exceed the end of the buffer. The resulting negative max_len is then passed to cifs_strndup_from_utf16(), and the non-Unicode path forwards it to kstrndup() as a size_t, allowing strnlen() to read out of bounds.

Validate each string offset before deriving the string pointer.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
CVSS Score: 9.4

AV:N - A remote malicious SMB/DFS server delivers the malformed DFS referral reply over the network when the CIFS client issues FSCTL_DFS_GET_REFERRALS (SMB2) or TRANS2_GET_DFS_REFERRAL (SMB1); no local or physical access is required to reach parse_dfs_referrals(). AC:L - Once a client session exists, the attacker fully controls referral header fields and per-entry DfsPathOffset/NetworkAddressOffset in the reply; no races, timing, or victim-specific memory layout are needed to trigger the out-of-bounds read reliably. PR:N - Exploitation requires no privileges on the victim host—the attacker only needs to operate the SMB server returning the malicious DFS referral; the client kernel parses the response regardless of which local user triggered the referral lookup. UI:N - After a DFS CIFS mount or autofs/enterprise logon mount, referral lookups and periodic dfs_cache_refresh work run automatically on file access and reconnect without any additional deliberate user action beyond normal SMB/DFS client use. S:U - The flaw corrupts/confidentiality-impacts kernel memory in the same security authority as the CIFS client; it does not by itself cross a hypervisor, IOMMU, or container sandbox boundary distinct from standard kernel compromise. C:H - Unvalidated string offsets let DfsPath/NetworkAddress pointers sit past the response buffer; the resulting negative max_len is cast to size_t for kstrndup()/strnlen(), enabling large out-of-bounds reads of adjacent kernel memory (SMB1/non-Unicode path). I:L - The bug is an out-of-bounds read that copies attacker-influenced kernel bytes into newly allocated heap buffers rather than an arbitrary write primitive, but heap contents are modified beyond the intended referral data scope. A:H - Reading past the SMB response buffer can oops/panic the kernel on unmapped pages, and casting a negative max_len to size_t can drive very large strnlen()/allocation attempts, causing severe denial of service on servers and workstations using DFS mounts.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 4ecce920e13ace16a5ba45efe8909946c28fb2ad to 76c607b9353d377b1d1b11db50e743eee0ccf658 (excl.)
  • affected from 4ecce920e13ace16a5ba45efe8909946c28fb2ad to d64b6be5740ce230aca184d8d224c75d9866045d (excl.)
  • affected from 4ecce920e13ace16a5ba45efe8909946c28fb2ad to 929a85932d14190988f1eafd6ee8cc68d66ace0b (excl.)
  • affected from 4ecce920e13ace16a5ba45efe8909946c28fb2ad to b784cd1c24d89bf71be2efe1e948ff7c03371e57 (excl.)
  • affected from 4ecce920e13ace16a5ba45efe8909946c28fb2ad to c37abc99bb3de3d3219ecef253d649f74117fd83 (excl.)
  • affected from 4ecce920e13ace16a5ba45efe8909946c28fb2ad to 027a84ac6b50c12ef767c15abfc58aa865820e9e (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.11 is affected
  • unaffected from 0 to 4.11 (excl.)
  • unaffected from 6.1.178 to 6.1.* (incl.)
  • unaffected from 6.6.145 to 6.6.* (incl.)
  • unaffected from 6.12.97 to 6.12.* (incl.)
  • unaffected from 6.18.40 to 6.18.* (incl.)
  • unaffected from 7.1.5 to 7.1.* (incl.)
  • unaffected from 7.2 to * (incl.)

References