* [patch] wcn36xx: harmless memory corruption bug in debugfs
@ 2013-11-06 7:41 Dan Carpenter
2013-11-06 8:12 ` Eugene Krasnikov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-11-06 7:41 UTC (permalink / raw)
To: Eugene Krasnikov
Cc: John W. Linville, wcn36xx, linux-wireless, kernel-janitors
On 64 bit systems we write past the end of the arg[] array.
Fixes: 8e84c2582169 ('wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c
index 5b84f7a..ef44a2da 100644
--- a/drivers/net/wireless/ath/wcn36xx/debug.c
+++ b/drivers/net/wireless/ath/wcn36xx/debug.c
@@ -126,7 +126,7 @@ static ssize_t write_file_dump(struct file *file,
if (begin == NULL)
break;
- if (kstrtoul(begin, 0, (unsigned long *)(arg + i)) != 0)
+ if (kstrtou32(begin, 0, &arg[i]) != 0)
break;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] wcn36xx: harmless memory corruption bug in debugfs
2013-11-06 7:41 [patch] wcn36xx: harmless memory corruption bug in debugfs Dan Carpenter
@ 2013-11-06 8:12 ` Eugene Krasnikov
0 siblings, 0 replies; 2+ messages in thread
From: Eugene Krasnikov @ 2013-11-06 8:12 UTC (permalink / raw)
To: Dan Carpenter; +Cc: John W. Linville, wcn36xx, linux-wireless, kernel-janitors
Looks good to me, thanx!
On Wed, Nov 6, 2013 at 7:41 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On 64 bit systems we write past the end of the arg[] array.
>
> Fixes: 8e84c2582169 ('wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c
> index 5b84f7a..ef44a2da 100644
> --- a/drivers/net/wireless/ath/wcn36xx/debug.c
> +++ b/drivers/net/wireless/ath/wcn36xx/debug.c
> @@ -126,7 +126,7 @@ static ssize_t write_file_dump(struct file *file,
> if (begin == NULL)
> break;
>
> - if (kstrtoul(begin, 0, (unsigned long *)(arg + i)) != 0)
> + if (kstrtou32(begin, 0, &arg[i]) != 0)
> break;
> }
>
--
Best regards,
Eugene
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-06 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 7:41 [patch] wcn36xx: harmless memory corruption bug in debugfs Dan Carpenter
2013-11-06 8:12 ` Eugene Krasnikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox