qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] scsi: megasas: initialise local configuration data buffer
@ 2016-05-25 12:11 P J P
  2016-06-07  6:51 ` P J P
  0 siblings, 1 reply; 4+ messages in thread
From: P J P @ 2016-05-25 12:11 UTC (permalink / raw)
  To: Qemu Developers
  Cc: Paolo Bonzini, Li Qiang, Hannes Reinecke, Alexander Graf,
	Prasad J Pandit

From: Prasad J Pandit <pjp@fedoraproject.org>

When reading MegaRAID SAS controller configuration via MegaRAID
Firmware Interface(MFI) commands, routine megasas_dcmd_cfg_read
uses an uninitialised local data buffer. Initialise this buffer
to avoid stack information leakage.

Reported-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
---
 hw/scsi/megasas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Update as per
  -> https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg04402.html

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index dcbd3e1..bf642d4 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -1293,7 +1293,7 @@ static int megasas_dcmd_ld_get_info(MegasasState *s, MegasasCmd *cmd)
 
 static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
 {
-    uint8_t data[4096];
+    uint8_t data[4096] = { 0 };
     struct mfi_config_data *info;
     int num_pd_disks = 0, array_offset, ld_offset;
     BusChild *kid;
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scsi: megasas: initialise local configuration data buffer
  2016-05-25 12:11 [Qemu-devel] [PATCH v2] scsi: megasas: initialise local configuration data buffer P J P
@ 2016-06-07  6:51 ` P J P
  2016-06-07  7:53   ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: P J P @ 2016-06-07  6:51 UTC (permalink / raw)
  To: Qemu Developers; +Cc: Paolo Bonzini, Li Qiang, Hannes Reinecke, Alexander Graf

+-- On Wed, 25 May 2016, P J P wrote --+
| Update as per
|   -> https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg04402.html
| 
| diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
| index dcbd3e1..bf642d4 100644
| --- a/hw/scsi/megasas.c
| +++ b/hw/scsi/megasas.c
| @@ -1293,7 +1293,7 @@ static int megasas_dcmd_ld_get_info(MegasasState *s, MegasasCmd *cmd)
|  
|  static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
|  {
| -    uint8_t data[4096];
| +    uint8_t data[4096] = { 0 };
|      struct mfi_config_data *info;
|      int num_pd_disks = 0, array_offset, ld_offset;
|      BusChild *kid;

Ping..!

This one came with couple of others,

  -> https://patchwork.ozlabs.org/patch/626089/
  -> https://patchwork.ozlabs.org/patch/626152/
  -> https://patchwork.ozlabs.org/patch/626151/

Are these queued? (just checking)

Thank you. 
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scsi: megasas: initialise local configuration data buffer
  2016-06-07  6:51 ` P J P
@ 2016-06-07  7:53   ` Paolo Bonzini
  2016-06-07  8:48     ` P J P
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2016-06-07  7:53 UTC (permalink / raw)
  To: P J P, Qemu Developers; +Cc: Li Qiang, Hannes Reinecke, Alexander Graf



On 07/06/2016 08:51, P J P wrote:
> +-- On Wed, 25 May 2016, P J P wrote --+
> | Update as per
> |   -> https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg04402.html
> | 
> | diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
> | index dcbd3e1..bf642d4 100644
> | --- a/hw/scsi/megasas.c
> | +++ b/hw/scsi/megasas.c
> | @@ -1293,7 +1293,7 @@ static int megasas_dcmd_ld_get_info(MegasasState *s, MegasasCmd *cmd)
> |  
> |  static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
> |  {
> | -    uint8_t data[4096];
> | +    uint8_t data[4096] = { 0 };
> |      struct mfi_config_data *info;
> |      int num_pd_disks = 0, array_offset, ld_offset;
> |      BusChild *kid;
> 
> Ping..!
> 
> This one came with couple of others,
> 
>   -> https://patchwork.ozlabs.org/patch/626089/
>   -> https://patchwork.ozlabs.org/patch/626152/
>   -> https://patchwork.ozlabs.org/patch/626151/
> 
> Are these queued? (just checking)

They are in already.  In particular this is commit
d37af740730dbbb93960cd318e040372d04d6dcf.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] scsi: megasas: initialise local configuration data buffer
  2016-06-07  7:53   ` Paolo Bonzini
@ 2016-06-07  8:48     ` P J P
  0 siblings, 0 replies; 4+ messages in thread
From: P J P @ 2016-06-07  8:48 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Qemu Developers, Li Qiang, Hannes Reinecke, Alexander Graf

+-- On Tue, 7 Jun 2016, Paolo Bonzini wrote --+
| They are in already.  In particular this is commit
| d37af740730dbbb93960cd318e040372d04d6dcf.

Okay, thank you. (sorry to bother you)
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-07  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 12:11 [Qemu-devel] [PATCH v2] scsi: megasas: initialise local configuration data buffer P J P
2016-06-07  6:51 ` P J P
2016-06-07  7:53   ` Paolo Bonzini
2016-06-07  8:48     ` P J P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).