From: Dan Carpenter Date: Wed, 6 Nov 2013 07:41:28 +0000 (+0300) Subject: wcn36xx: harmless memory corruption bug in debugfs X-Git-Tag: accepted/tizen/common/20141203.182822~1043^2~6^2^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=876efcf05c3aa582de5efefa7dd6fbb731b4d085;p=platform%2Fkernel%2Flinux-arm64.git wcn36xx: harmless memory corruption bug in debugfs 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 Signed-off-by: John W. Linville --- 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; }