linux/drivers/vfio/pci
Artem Sadovnikov 410e899811 vfio/mlx5: fix possible overflow in tracking max message size
[ Upstream commit b306019848 ]

MLX cap pg_track_log_max_msg_size consists of 5 bits, value of which is
used as power of 2 for max_msg_size. This can lead to multiplication
overflow between max_msg_size (u32) and integer constant, and afterwards
incorrect value is being written to rq_size.

Fix this issue by extending integer constant to u64 type.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Suggested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Artem Sadovnikov <a.sadovnikov@ispras.ru>
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20250701144017.2410-2-a.sadovnikov@ispras.ru
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-20 18:30:48 +02:00
..
hisilicon hisi_acc_vfio_pci: bugfix the problem of uninstalling driver 2025-07-10 16:05:00 +02:00
mlx5 vfio/mlx5: fix possible overflow in tracking max message size 2025-08-20 18:30:48 +02:00
nvgrace-gpu vfio/nvgrace-gpu: Expose the blackwell device PF BAR1 to the VM 2025-02-21 14:01:26 +01:00
pds vfio/pds: Fix missing detach_ioas op 2025-08-15 12:14:02 +02:00
qat vfio/qat: fix overflow check in qat_vf_resume_write() 2024-12-09 10:41:04 +01:00
virtio vfio/pci: rename and export range_intersect_range 2024-02-22 12:20:20 -07:00
Kconfig vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices 2024-04-29 13:25:41 -06:00
Makefile vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices 2024-04-29 13:25:41 -06:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci.c VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-13 14:07:33 +00:00
vfio_pci_config.c vfio/pci: Handle INTx IRQ_NOTCONNECTED 2025-05-29 11:02:15 +02:00
vfio_pci_core.c vfio/pci: Separate SR-IOV VF dev_set 2025-08-15 12:14:02 +02:00
vfio_pci_igd.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00
vfio_pci_intrs.c vfio/pci: Handle INTx IRQ_NOTCONNECTED 2025-05-29 11:02:15 +02:00
vfio_pci_priv.h vfio/pci: Mask INTx during runtime suspend 2022-09-01 15:29:11 -06:00
vfio_pci_rdwr.c vfio/pci: Enable iowrite64 and ioread64 for vfio pci 2025-02-21 14:01:26 +01:00
vfio_pci_zdev.c Merge remote-tracking branch 'mlx5/mlx5-vfio' into v6.1/vfio/next 2022-09-08 10:44:34 -06:00