From: Luciano Coelho Date: Fri, 1 Apr 2011 16:42:02 +0000 (+0300) Subject: wl12xx: fix potential buffer overflow in testmode nvs push X-Git-Tag: v2.6.39-rc3~6^2~8^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09b661b33268698d3b453dceb78cda129ad899b4;p=pandora-kernel.git wl12xx: fix potential buffer overflow in testmode nvs push We were allocating the size of the NVS file struct and not checking whether the length of the buffer passed was correct before copying it into the allocated memory. This is a security hole because buffer overflows can occur if the userspace passes a bigger file than what is expected. With this patch, we check if the size of the data passed from userspace matches the size required. This bug was introduced in 2.6.36. Cc: stable@kernel.org Reported-by: Ido Yariv Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville --- Reading git-diff-tree failed