From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Nico Golde <nico@ngolde.de>,
Fabian Yamaguchi <fabs@goesec.de>,
Dan Carpenter <dan.carpenter@oracle.com>,
Sumit Saxena <sumit.saxena@lsi.com>,
James Bottomley <JBottomley@Parallels.com>
Subject: [PATCH 3.4 1/9] SCSI: megaraid: missing bounds check in mimd_to_kioc()
Date: Fri, 16 May 2014 15:55:24 -0700 [thread overview]
Message-ID: <20140516225458.642634316@linuxfoundation.org> (raw)
In-Reply-To: <20140516225458.512693003@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 3de2260140417759c669d391613d583baf03b0cf upstream.
pthru32->dataxferlen comes from the user so we need to check that it's
not too large so we don't overflow the buffer.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/megaraid/megaraid_mm.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -486,6 +486,8 @@ mimd_to_kioc(mimd_t __user *umimd, mraid
pthru32->dataxferaddr = kioc->buf_paddr;
if (kioc->data_dir & UIOC_WR) {
+ if (pthru32->dataxferlen > kioc->xferlen)
+ return -EINVAL;
if (copy_from_user(kioc->buf_vaddr, kioc->user_data,
pthru32->dataxferlen)) {
return (-EFAULT);
next prev parent reply other threads:[~2014-05-16 22:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 22:55 [PATCH 3.4 0/9] 3.4.91-stable review Greg Kroah-Hartman
2014-05-16 22:55 ` Greg Kroah-Hartman [this message]
2014-05-16 22:55 ` [PATCH 3.4 2/9] n_tty: Fix n_tty_write crash when echoing in raw mode Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 3/9] blktrace: fix accounting of partially completed requests Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 4/9] netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 5/9] net: Add net_ratelimited_function and net_<level>_ratelimited macros Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 6/9] netfilter: Cant fail and free after table replacement Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 7/9] tracepoint: Do not waste memory on mods with no tracepoints Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 8/9] powerpc: Add vr save/restore functions Greg Kroah-Hartman
2014-05-16 22:55 ` [PATCH 3.4 9/9] tgafb: fix mode setting with fbset Greg Kroah-Hartman
2014-05-17 15:44 ` [PATCH 3.4 0/9] 3.4.91-stable review Guenter Roeck
2014-05-17 17:25 ` Greg Kroah-Hartman
2014-05-18 10:09 ` Satoru Takeuchi
2014-05-18 12:23 ` Greg Kroah-Hartman
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=20140516225458.642634316@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=JBottomley@Parallels.com \
--cc=dan.carpenter@oracle.com \
--cc=fabs@goesec.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@ngolde.de \
--cc=stable@vger.kernel.org \
--cc=sumit.saxena@lsi.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;
as well as URLs for NNTP newsgroup(s).