UBUNTU-CVE-2026-99274: Medium severity ubuntu/linux vulnerability
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix fiemap wild read on empty truncated response smb3fiemap() treats -E2BIG from SMB2ioctl() as a truncated range blob and loops for the next chunk. If the server reports STATUSBUFFEROVERFLOW with OutputCount == 0, SMB2ioctl() returns -E2BIG with outdata == NULL and outdatalen == 0, and the existing length checks accept the empty result. The loop then evaluates next = outdata[num - 1].fileoffset + ... with num == 0, reading 16 bytes before NULL. Reject a truncated range blob that contains no range, so the resume offset is never computed from an empty response. Also require the last range in a truncated blob to advance the resume offset without overflowing, and to stay within the requested range; a malicious or broken server could otherwise make no progress or underflow len and loop forever. Free the previous response buffer before retrying. Reproduced on 6.6.87.2 with a malicious SMB2 server that answers FSCTLQUERYALLOCATEDRANGES with STATUSBUFFEROVERFLOW and OutputCount == 0; an FSIOCFIEMAP ioctl on the mount oopses in cifsfiemap() with CR2 = fffffffffffffff8. The code path is unchanged on mainline.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Reject a truncated range blob containing no range, and require its last range to advance the resume offset without overflow and remain within the requested range.
- Operational
Free the previous response buffer before retrying.