[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/7] hw/rdma: Fix possible out of bounds access to p
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH 7/7] hw/rdma: Fix possible out of bounds access to port GID index |
Date: |
Mon, 30 Apr 2018 23:02:23 +0300 |
Make sure the backend GID index is less then port's
git table length.
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Yuval Shaia <address@hidden>
---
hw/rdma/rdma_backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index 5c7b3d8949..e9ced6f9ef 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -774,7 +774,7 @@ int rdma_backend_init(RdmaBackendDev *backend_dev,
goto out_destroy_comm_channel;
}
- if (backend_dev->backend_gid_idx > port_attr.gid_tbl_len) {
+ if (backend_dev->backend_gid_idx >= port_attr.gid_tbl_len) {
error_setg(errp, "Invalid backend_gid_idx, should be less than %d",
port_attr.gid_tbl_len);
goto out_destroy_comm_channel;
--
2.14.3
- [Qemu-devel] [PATCH 0/7] hw/rdma: coverity fixes, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 1/7] hw/rdma: Fix possible munmap call on a NULL pointer, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 3/7] hw/rdma: Delete port's pkey table, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 4/7] hw/rdma: Fix possible out of bounds access to GID table, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 2/7] hw/rdma: Fix possible usage of a NULL pointer, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 5/7] hw/rdma: Fix possible out of bounds access to regs array, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 6/7] hw/rdma: Delete duplicate definition of MAX_RM_TBL_NAME, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 7/7] hw/rdma: Fix possible out of bounds access to port GID index,
Marcel Apfelbaum <=