[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/13] iscsi: Don't access non-existent scsi_lba_status_descriptor
From: |
Kevin Wolf |
Subject: |
[PULL 13/13] iscsi: Don't access non-existent scsi_lba_status_descriptor |
Date: |
Mon, 27 Jan 2020 18:55:59 +0100 |
In iscsi_co_block_status(), we may have received num_descriptors == 0
from the iscsi server. Therefore, we can't unconditionally access
lbas->descriptors[0]. Add the missing check.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Felipe Franciosi <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Peter Lieven <address@hidden>
---
block/iscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index cbd57294ab..c8feaa2f0e 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -753,7 +753,7 @@ retry:
}
lbas = scsi_datain_unmarshall(iTask.task);
- if (lbas == NULL) {
+ if (lbas == NULL || lbas->num_descriptors == 0) {
ret = -EIO;
goto out_unlock;
}
--
2.20.1
- [PULL 02/13] iotests: Add more "skip_if_unsupported" statements to the python tests, (continued)
- [PULL 02/13] iotests: Add more "skip_if_unsupported" statements to the python tests, Kevin Wolf, 2020/01/27
- [PULL 05/13] blockdev: unify qmp_blockdev_backup and blockdev-backup transaction paths, Kevin Wolf, 2020/01/27
- [PULL 04/13] blockdev: unify qmp_drive_backup and drive-backup transaction paths, Kevin Wolf, 2020/01/27
- [PULL 11/13] block/backup: fix memory leak in bdrv_backup_top_append(), Kevin Wolf, 2020/01/27
- [PULL 06/13] blockdev: honor bdrv_try_set_aio_context() context requirements, Kevin Wolf, 2020/01/27
- [PULL 09/13] blockdev: Return bs to the proper context on snapshot abort, Kevin Wolf, 2020/01/27
- [PULL 10/13] iotests: Test handling of AioContexts with some blockdev actions, Kevin Wolf, 2020/01/27
- [PULL 08/13] blockdev: Acquire AioContext on dirty bitmap functions, Kevin Wolf, 2020/01/27
- [PULL 07/13] block/backup-top: Don't acquire context while dropping top, Kevin Wolf, 2020/01/27
- [PULL 12/13] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711), Kevin Wolf, 2020/01/27
- [PULL 13/13] iscsi: Don't access non-existent scsi_lba_status_descriptor,
Kevin Wolf <=
- Re: [PULL 00/13] Block layer patches, Peter Maydell, 2020/01/28