Linux
cifs: validate DFS referral string offsets
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4ecce920e13ace16a5ba45efe8909946c28fb2ad, < 76c607b9353d377b1d1b11db50e743eee0ccf658
- >= 4ecce920e13ace16a5ba45efe8909946c28fb2ad, < d64b6be5740ce230aca184d8d224c75d9866045d
- >= 4ecce920e13ace16a5ba45efe8909946c28fb2ad, < 929a85932d14190988f1eafd6ee8cc68d66ace0b
- >= 4ecce920e13ace16a5ba45efe8909946c28fb2ad, < b784cd1c24d89bf71be2efe1e948ff7c03371e57
- >= 4ecce920e13ace16a5ba45efe8909946c28fb2ad, < c37abc99bb3de3d3219ecef253d649f74117fd83
- >= 4ecce920e13ace16a5ba45efe8909946c28fb2ad, < 027a84ac6b50c12ef767c15abfc58aa865820e9e
Fixed in 76c607b9353d377b1d1b11db50e743eee0ccf658, d64b6be5740ce230aca184d8d224c75d9866045d, 929a85932d14190988f1eafd6ee8cc68d66ace0b, b784cd1c24d89bf71be2efe1e948ff7c03371e57, c37abc99bb3de3d3219ecef253d649f74117fd83, 027a84ac6b50c12ef767c15abfc58aa865820e9e
- 4.11
Fixed in 0, 6.1.178, 6.6.145, 6.12.97, 6.18.40, 7.1.5, 7.2
Mitigation
Upgrade Linux to 76c607b9353d377b1d1b11db50e743eee0ccf658 or d64b6be5740ce230aca184d8d224c75d9866045d or 929a85932d14190988f1eafd6ee8cc68d66ace0b or b784cd1c24d89bf71be2efe1e948ff7c03371e57 or c37abc99bb3de3d3219ecef253d649f74117fd83 or 027a84ac6b50c12ef767c15abfc58aa865820e9e or later.
Upgrade Linux to 0 or 6.1.178 or 6.6.145 or 6.12.97 or 6.18.40 or 7.1.5 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.