From: Larry Finger <Larry.Finger@lwfinger.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 1/2] staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
Date: Fri, 07 Feb 2014 02:50:29 +0000 [thread overview]
Message-ID: <52F449F5.7050005@lwfinger.net> (raw)
In-Reply-To: <20140203223803.GA28874@elgon.mountain>
On 02/03/2014 04:38 PM, Dan Carpenter wrote:
> MAX_MP_IOCTL_SUBCODE (35) and mp_ioctl_hdl (32 elements) are no longer
> in sync. It leads to a bogus pointer dereference.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Larry
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> index dec992569476..684bc8107a48 100644
> --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> @@ -2500,7 +2500,7 @@ static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info
> ("rtw_mp_ioctl_hdl: subcode [%d], len[%d], buffer_len[%d]\r\n",
> poidparam->subcode, poidparam->len, len));
>
> - if (poidparam->subcode >= MAX_MP_IOCTL_SUBCODE) {
> + if (poidparam->subcode >= ARRAY_SIZE(mp_ioctl_hdl)) {
> RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, ("no matching drvext subcodes\r\n"));
> ret = -EINVAL;
> goto _rtw_mp_ioctl_hdl_exit;
>
prev parent reply other threads:[~2014-02-07 2:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 22:38 [patch 1/2] staging: r8188eu: array overflow in rtw_mp_ioctl_hdl() Dan Carpenter
2014-02-07 2:50 ` Larry Finger [this message]
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=52F449F5.7050005@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=kernel-janitors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.