smb/client: handle overlapping allocated ranges in fallocate
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 966a3cb7c7db786452a87afdc3b48858fc4d4d6b · < 7e08ab7a061b17ac1989a225c6afb53f44a86808| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb/client: handle overlapping allocated ranges in fallocate
smb3_simple_fallocate_range() can skip holes when an allocated range returned by the server starts before the current fallocate offset. The skipped hole is not zero-filled, but fallocate still returns success. A later write to that hole may therefore fail with ENOSPC.
The function queries allocated ranges so that it can preserve existing contents and write zeroes only into holes. However, the server may return a range that starts before the current fallocate offset.
For example, assume the fallocate request is [100, 400) and the only allocated range returned by the server is [0, 200):
Request: [100, 400) Server range: [ 0, 200) allocated
Correct: [100, 200) allocated data, skip [200, 400) hole, zero-fill
Current: [100, 300) skipped [300, 400) zero-filled afterwards
From the CVE record · Linux
The Linux kernel SMB client can mishandle allocated ranges returned by a server during fallocate, skipping a hole while still reporting success. A malformed range length can also cause an out-of-bounds zero-buffer read; the input does not specify authentication or user-interaction requirements.
Operators running the Linux kernel SMB client should check their kernel versions; affected versions are not specified.