]> git.ipfire.org Git - thirdparty/qemu.git/commit
pvrdma: check number of pages when creating rings
authorPrasad J Pandit <pjp@fedoraproject.org>
Wed, 12 Dec 2018 19:30:36 +0000 (01:00 +0530)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 30 Jul 2019 20:19:15 +0000 (15:19 -0500)
commit2a0e6f13691d6dfe23af0b10739d341ad9aa9ea0
tree52168cbe67d5a187307859a7cd4f143665e61c31
parent017f271f7a3019cbae0815b4800639dde83823d4
pvrdma: check number of pages when creating rings

When creating CQ/QP rings, an object can have up to
PVRDMA_MAX_FAST_REG_PAGES 8 pages. Check 'npages' parameter
to avoid excessive memory allocation or a null dereference.

Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 2c858ce5da8ae6689c75182b73bc455a291cad41)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/rdma/vmw/pvrdma_cmd.c