* [patch 1/2] staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
@ 2014-02-03 22:38 Dan Carpenter
2014-02-07 2:50 ` Larry Finger
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-02-03 22:38 UTC (permalink / raw)
To: kernel-janitors
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>
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch 1/2] staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
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
0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2014-02-07 2:50 UTC (permalink / raw)
To: kernel-janitors
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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-07 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.