Paolo Bonzini 61f6b12cf3 scsi-generic: fix buffer overflow on block limits inquiry
Using linux 6.x guest, at boot time, an inquiry on a scsi-generic
device makes qemu crash.  This is caused by a buffer overflow when
scsi-generic patches the block limits VPD page.

Do the operations on a temporary on-stack buffer that is guaranteed
to be large enough.

Reported-by: Théo Maillart <tmaillart@freebox.fr>
Analyzed-by: Théo Maillart <tmaillart@freebox.fr>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 9bd634b2f5e2f10fe35d7609eb83f30583f2e15a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-05-18 21:10:00 +03:00
..
2023-05-18 21:09:59 +03:00
2022-10-31 11:32:07 +01:00
2022-10-31 18:48:23 +00:00
2023-04-13 18:28:32 +03:00
2022-10-27 11:34:31 +01:00
2022-11-16 10:15:26 +01:00