Description
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 products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
4ecce920e13ace16a5ba45efe8909946c28fb2ad to < 76c607b9353d377b1d1b11db50e743eee0ccf658affected4ecce920e13ace16a5ba45efe8909946c28fb2ad to < d64b6be5740ce230aca184d8d224c75d9866045daffected4ecce920e13ace16a5ba45efe8909946c28fb2ad to < 929a85932d14190988f1eafd6ee8cc68d66ace0baffected4ecce920e13ace16a5ba45efe8909946c28fb2ad to < b784cd1c24d89bf71be2efe1e948ff7c03371e57affected4ecce920e13ace16a5ba45efe8909946c28fb2ad to < c37abc99bb3de3d3219ecef253d649f74117fd83affected4ecce920e13ace16a5ba45efe8909946c28fb2ad to < 027a84ac6b50c12ef767c15abfc58aa865820e9eaffected
Linux Linux
Default version status: affected
4.11affected0 to < 4.11unaffected6.1.178 to ≤ 6.1.*unaffected6.6.145 to ≤ 6.6.*unaffected6.12.97 to ≤ 6.12.*unaffected6.18.40 to ≤ 6.18.*unaffected7.1.5 to ≤ 7.1.*unaffected7.2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/76c607b9353d377b1d1b11db50e743eee0ccf658 ↗
- https://git.kernel.org/stable/c/d64b6be5740ce230aca184d8d224c75d9866045d ↗
- https://git.kernel.org/stable/c/929a85932d14190988f1eafd6ee8cc68d66ace0b ↗
- https://git.kernel.org/stable/c/b784cd1c24d89bf71be2efe1e948ff7c03371e57 ↗
- https://git.kernel.org/stable/c/c37abc99bb3de3d3219ecef253d649f74117fd83 ↗
- https://git.kernel.org/stable/c/027a84ac6b50c12ef767c15abfc58aa865820e9e ↗