vsock: fix buffer size clamping order
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 · < 2602f7bb5818e92315feeaeb71d8ce4d5c9ab160| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vsock: fix buffer size clamping order
In vsock_update_buffer_size(), the buffer size was being clamped to the maximum first, and then to the minimum. If a user sets a minimum buffer size larger than the maximum, the minimum check overrides the maximum check, inverting the constraint.
This breaks the intended socket memory boundaries by allowing the vsk->buffer_size to grow beyond the configured vsk->buffer_max_size.
Fix this by checking the minimum first, and then the maximum. This ensures the buffer size never exceeds the buffer_max_size.
From the CVE record · Linux
The Linux kernel’s vsock buffer-size update clamps the maximum before the minimum. If a user sets a minimum buffer size above the maximum, the resulting buffer can exceed the configured maximum. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running the Linux kernel should check their vsock exposure; affected versions were not provided.