CVE-2022-48864: vdpa/mlx5: add validation for VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
vdpa/mlx5: add validation for VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command
When control vq receives a VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command request from the driver, presently there is no validation against the number of queue pairs to configure, or even if multiqueue had been negotiated or not is unverified. This may lead to kernel panic due to uninitialized resource for the queues were there any bogus request sent down by untrusted driver. Tie up the loose ends there.
The Linux kernel CVE team has assigned CVE-2022-48864 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 52893733f2c5 and fixed in 5.15.29 with commit e7e118416465 Issue introduced in 5.15 with commit 52893733f2c5 and fixed in 5.16.15 with commit 9f6effca7562 Issue introduced in 5.15 with commit 52893733f2c5 and fixed in 5.17 with commit ed0f849fc3a6
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-2022-48864
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:
drivers/vdpa/mlx5/net/mlx5_vnet.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/e7e118416465f2ba8b55007e5b789823e101421e https://git.kernel.org/stable/c/9f6effca75626c7a7c7620dabcb1a254ca530230 https://git.kernel.org/stable/c/ed0f849fc3a63ed2ddf5e72cdb1de3bdbbb0f8eb