Re: [PATCH] scsi: megaraid: Fix null dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2023-04-03 at 17:34 +0300, Igor Artemiev wrote:
> When cmdid == CMDID_INT_CMDS, the 'mbox' pointer is NULL but is
> dereferenced below.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 0f2bb84d2a68 ("[SCSI] megaraid: simplify internal command
> handling")
> Signed-off-by: Igor Artemiev <Igor.A.Artemiev@xxxxxxx>
> ---
>  drivers/scsi/megaraid.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
> index bf491af9f0d6..4fbf92dc717e 100644
> --- a/drivers/scsi/megaraid.c
> +++ b/drivers/scsi/megaraid.c
> @@ -1441,6 +1441,7 @@ mega_cmd_done(adapter_t *adapter, u8
> completed[], int nstatus, int status)
>                  */
>                 if (cmdid == CMDID_INT_CMDS) {
>                         scb = &adapter->int_scb;
> +                       mbox = (mbox_t *)scb->raw_mbox;

Have you actually seen this and if so which firmware?  I thought
megaraid internal commands only ever returned success or fail (0 or 1)
meaning they can never get into the sense processing case that is the
only consumer of the mbox.

James




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux