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
..
2021-11-02 15:55:14 +00:00
2022-06-14 10:34:36 +02:00
2021-01-22 14:51:35 +01:00
2022-01-13 10:22:37 +01:00
2022-01-13 10:22:37 +01:00
2022-06-14 10:34:36 +02:00
2022-06-14 10:34:36 +02:00
2021-02-17 14:29:12 +01:00
2021-05-12 18:20:25 +02:00
2022-06-14 10:34:36 +02:00
2021-03-15 17:00:58 +01:00
2022-08-01 11:58:02 +02:00