lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 3 Apr 2023 19:47:16 +0300
From:   "Igor A. Artemiev" <Igor.A.Artemiev@...t.ru>
To:     jejb@...ux.ibm.com, Kashyap Desai <kashyap.desai@...adcom.com>
Cc:     Sumit Saxena <sumit.saxena@...adcom.com>,
        Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        megaraidlinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH] scsi: megaraid: Fix null dereference

On 4/3/23 18:19, James Bottomley wrote:
> 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@...t.ru>
>> ---
>>   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
>
No, I haven't seen this. A null dereference can be if the 'status'  is 
0x02. But if 'status' cannot be equal to 0x02, assignment isn't required.

Thanks,
Igor

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ