John Millikin
fe9d8927e2
scsi: Add buf_len parameter to scsi_req_new()
...
When a SCSI command is received from the guest, the CDB length implied
by the first byte might exceed the number of bytes the guest sent. In
this case scsi_req_new() will read uninitialized data, causing
unpredictable behavior.
Adds the buf_len parameter to scsi_req_new() and plumbs it through the
call stack.
Signed-off-by: John Millikin <john@john-millikin.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1127
Message-Id: <20220817053458.698416-1-john@john-millikin.com>
[Fill in correct length for adapters other than ESP. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-01 07:42:37 +02:00
..
2022-06-11 11:44:15 +02:00
2022-05-19 16:19:02 +01:00
2022-07-18 13:25:13 +01:00
2022-05-14 12:33:44 +02:00
2022-06-11 11:36:14 +02:00
2022-01-21 15:52:56 +10:00
2022-07-20 12:15:08 +01:00
2020-09-18 14:12:32 -04:00
2021-03-19 15:18:43 +01:00
2022-07-26 10:40:58 -04:00
2022-06-08 19:38:47 +01:00
2022-01-28 14:29:46 +00:00
2022-01-07 05:19:55 -05:00
2022-05-25 10:31:33 +02:00
2022-05-30 19:49:42 +02:00
2022-07-14 16:24:38 +02:00
2022-08-25 21:59:04 +02:00
2021-09-30 13:44:13 +01:00
2022-07-18 19:28:46 +01:00
2022-07-05 16:25:17 +05:30
2021-09-30 13:42:10 +01:00
2020-09-18 14:12:32 -04:00
2022-06-11 11:44:50 +02:00
2020-09-30 19:11:36 +02:00
2022-07-29 15:07:55 -07:00
2022-02-21 10:35:13 +01:00
2022-07-26 10:37:46 -04:00
2022-04-06 10:50:37 +02:00
2022-07-14 16:24:38 +02:00
2022-05-11 16:50:32 +02:00
2022-05-11 16:49:06 +02:00
2021-09-30 13:42:10 +01:00
2022-06-23 23:24:28 +02:00
2022-06-09 19:32:49 -04:00
2022-07-29 15:07:55 -07:00
2022-07-06 10:22:38 -03:00
2021-11-02 15:55:14 +00:00
2022-06-15 16:43:42 +01:00
2022-05-11 16:49:06 +02:00
2022-06-11 11:44:50 +02:00
2022-05-11 16:49:06 +02:00
2022-05-11 16:50:01 +02:00
2022-09-01 07:42:37 +02:00
2021-11-02 14:14:55 -04:00
2022-07-14 16:24:38 +02:00
2021-10-30 18:39:37 +02:00
2022-06-11 11:44:50 +02:00
2021-03-19 15:18:43 +01:00
2022-05-11 16:49:06 +02:00
2022-05-11 16:49:06 +02:00
2022-05-11 16:50:01 +02:00
2022-05-11 16:49:06 +02:00
2022-05-06 09:06:51 -06:00
2022-07-20 16:58:08 +08:00
2022-05-11 16:49:06 +02:00
2022-06-29 00:24:59 +02:00
2019-08-16 13:31:52 +02:00
2022-08-25 21:59:04 +02:00
2021-10-27 17:10:00 -07:00
2022-01-20 09:09:37 +01:00
2020-09-09 09:27:09 -04:00
2020-09-09 09:27:09 -04:00
2022-04-21 17:03:51 +04:00
2022-06-09 14:47:42 +01:00
2022-04-21 11:37:04 +01:00
2020-11-15 17:04:40 +01:00
2022-06-10 09:31:42 +10:00
2020-09-09 09:27:09 -04:00
2020-09-09 09:27:09 -04:00
2020-09-18 14:12:32 -04:00
2020-11-15 17:04:40 +01:00
2022-05-19 16:19:03 +01:00
2021-03-08 17:20:01 +00:00
2022-08-01 11:58:02 +02:00
2019-06-12 13:20:21 +02:00
2020-12-18 15:20:17 -05:00
2022-05-14 12:32:41 +02:00
2021-09-01 11:59:12 +10:00
2022-06-22 09:49:34 +02:00
2020-09-09 09:27:09 -04:00
2020-12-10 12:15:04 -05:00
2020-09-18 14:12:32 -04:00
2021-07-09 18:21:33 +02:00
2020-09-09 09:27:09 -04:00