diff options
author | Harshit Mogalapalli <[email protected]> | 2022-11-28 07:57:15 -0800 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2022-12-28 05:28:11 -0500 |
commit | 937c783aa3d8d77963ec91918d3298edb45b9161 (patch) | |
tree | 5789cf3d4f30f1b475efbb6e28a1538ea56dada0 /drivers/platform/surface/aggregator/ssh_request_layer.c | |
parent | 81931012bd7dc52fadf2b720605fce8a7148d4a7 (diff) |
vduse: Validate vq_num in vduse_validate_config()
Add a limit to 'config->vq_num' which is user controlled data which
comes from an vduse_ioctl to prevent large memory allocations.
Micheal says - This limit is somewhat arbitrary.
However, currently virtio pci and ccw are limited to a 16 bit vq number.
While MMIO isn't it is also isn't used with lots of VQs due to
current lack of support for per-vq interrupts.
Thus, the 0xffff limit on number of VQs corresponding
to a 16-bit VQ number seems sufficient for now.
This is found using static analysis with smatch.
Suggested-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Harshit Mogalapalli <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_request_layer.c')
0 files changed, 0 insertions, 0 deletions