Re: [PATCH v2 2/3] megasas: avoid NULL pointer dereference

2020-05-26 Thread Paolo Bonzini
On 26/05/20 09:18, P J P wrote: > Later when address_space_map() returns 'NULL' above, '*plen' is not set to > zero. > > diff --git a/exec.c b/exec.c > index 5162f0d12f..4eea84bf66 100644 > --- a/exec.c > +++ b/exec.c > @@ -3538,6 +3538,7 @@ void *address_space_map(AddressSpace *as, > > if

Re: [PATCH v2 2/3] megasas: avoid NULL pointer dereference

2020-05-26 Thread P J P
Hello, +-- On Thu, 21 May 2020, Paolo Bonzini wrote --+ | I think the code here was expecting frame_size_p to be 0 if cmd->frame is | NULL. Can you check why this is not the case, or whether it ever was the | case? static MegasasCmd *megasas_enqueue_frame(MegasasState *s, hwaddr frame, .

Re: [PATCH v2 2/3] megasas: avoid NULL pointer dereference

2020-05-21 Thread Paolo Bonzini
On 13/05/20 21:25, P J P wrote: > From: Prasad J Pandit > > While in megasas_handle_frame(), megasas_enqueue_frame() may > set a NULL frame into MegasasCmd object for a given 'frame_addr' > address. Add check to avoid a NULL pointer dereference issue. > > Reported-by: Alexander Bulekov > Fixes:

Re: [PATCH v2 2/3] megasas: avoid NULL pointer dereference

2020-05-14 Thread Darren Kenny
On Thursday, 2020-05-14 at 00:55:39 +0530, P J P wrote: > From: Prasad J Pandit > > While in megasas_handle_frame(), megasas_enqueue_frame() may > set a NULL frame into MegasasCmd object for a given 'frame_addr' > address. Add check to avoid a NULL pointer dereference issue. > > Reported-by: Alexa

Re: [PATCH v2 2/3] megasas: avoid NULL pointer dereference

2020-05-13 Thread Alexander Bulekov
On 200514 0055, P J P wrote: > From: Prasad J Pandit > > While in megasas_handle_frame(), megasas_enqueue_frame() may > set a NULL frame into MegasasCmd object for a given 'frame_addr' > address. Add check to avoid a NULL pointer dereference issue. > > Reported-by: Alexander Bulekov > Fixes: ht

[PATCH v2 2/3] megasas: avoid NULL pointer dereference

2020-05-13 Thread P J P
From: Prasad J Pandit While in megasas_handle_frame(), megasas_enqueue_frame() may set a NULL frame into MegasasCmd object for a given 'frame_addr' address. Add check to avoid a NULL pointer dereference issue. Reported-by: Alexander Bulekov Fixes: https://bugs.launchpad.net/qemu/+bug/1878259 Si