Skip to contentSkip to conversation

CVE-2026-46234: vsock: fix buffer size clamping order

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-46234 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.5 with commit b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 and fixed in 6.6.140 with commit a998a7e250bf976539e05a00ec64a81292afecaa
	Issue introduced in 5.5 with commit b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 and fixed in 6.12.90 with commit 310da27932dd0afe7ce7456dfe1f0814c3301f41
	Issue introduced in 5.5 with commit b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 and fixed in 6.18.32 with commit 2602f7bb5818e92315feeaeb71d8ce4d5c9ab160
	Issue introduced in 5.5 with commit b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 and fixed in 7.0.9 with commit 0b68881501460c3761f196469e1e503218c5e536
	Issue introduced in 5.5 with commit b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 and fixed in 7.1-rc1 with commit d114bfdc9b76bf93b881e195b7ec957c14227bab

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-46234

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/vmw_vsock/af_vsock.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/a998a7e250bf976539e05a00ec64a81292afecaa
	https://git.kernel.org/stable/c/310da27932dd0afe7ce7456dfe1f0814c3301f41
	https://git.kernel.org/stable/c/2602f7bb5818e92315feeaeb71d8ce4d5c9ab160
	https://git.kernel.org/stable/c/0b68881501460c3761f196469e1e503218c5e536
	https://git.kernel.org/stable/c/d114bfdc9b76bf93b881e195b7ec957c14227bab