From: James Bottomley <jejb@linux.ibm.com>
To: Igor Artemiev <Igor.A.Artemiev@mcst.ru>,
Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>,
Shivasharan S <shivasharan.srikanteshwara@broadcom.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] scsi: megaraid: Fix null dereference
Date: Mon, 03 Apr 2023 11:19:00 -0400 [thread overview]
Message-ID: <84d55c1032a98de8b2118715d3ec435c409ca0a2.camel@linux.ibm.com> (raw)
In-Reply-To: <20230403143440.1923323-1-Igor.A.Artemiev@mcst.ru>
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@mcst.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
next prev parent reply other threads:[~2023-04-03 15:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 14:34 Igor Artemiev
2023-04-03 15:19 ` James Bottomley [this message]
2023-04-03 16:47 ` Igor A. Artemiev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84d55c1032a98de8b2118715d3ec435c409ca0a2.camel@linux.ibm.com \
--to=jejb@linux.ibm.com \
--cc=Igor.A.Artemiev@mcst.ru \
--cc=kashyap.desai@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=martin.petersen@oracle.com \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=shivasharan.srikanteshwara@broadcom.com \
--cc=sumit.saxena@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®