CVE-2026-89632: smb: client: fix use-before-check of ReparseDataLength in reparse_buf_ptr()
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix use-before-check of ReparseDataLength in reparsebufptr()
reparsebufptr() reads buf->ReparseDataLength before checking that count covers the full fixed header:
buf = (struct reparsedatabuffer )((u8 )io + off); len = sizeof(buf); / 8 bytes / rdlen = le16tocpu(buf->ReparseDataLength); / offset 4, 2 bytes /
if (count < len || count < rdlen + len) / check comes after /
struct reparsedatabuffer has ReparseDataLength at offset 4. If a server returns OutputCount < 6, the read at offset 4-5 reaches past the end of the received data. The off+count bounds against iovlen were already validated, but that does not protect against count being smaller than sizeof(buf).
Split the check: verify count >= sizeof(buf) before reading ReparseDataLength, then verify count covers the data region.
Affected Software
Event History
Frequently Asked Questions
Who can trigger this issue?
A server supplying SMB responses can trigger it by returning a reparse-data response whose OutputCount is smaller than 6. This makes SMB clients that process that response the exposed side.
What must an attacker control or send to exploit the flaw?
The attacker needs to cause the SMB client to process a response containing a reparse data buffer with an insufficient OutputCount. The vulnerable code reads ReparseDataLength at offsets 4-5 before confirming that the received count includes the complete fixed header.
How can I tell whether a system has the fix?
The fix changes reparse_buf_ptr() so it verifies count is at least sizeof(struct reparse_data_buffer) before reading ReparseDataLength, and only then verifies that count covers the data region. The provided stable kernel references identify commits containing this correction.