]> git.itanic.dy.fi Git - linux-stable/commit
wil6210: fix memory access violation in wil_memcpy_from/toio_32
authorDedy Lansky <qca_dlansky@qca.qualcomm.com>
Wed, 5 Apr 2017 11:58:11 +0000 (14:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:37:16 +0000 (09:37 +0100)
commit53165057044801541802f899ee3d415e8252b699
treea29f5914e45fca5026159d4bab7fe157af0fb2b0
parent534c796803f789b41b9d5cb38078aab856511902
wil6210: fix memory access violation in wil_memcpy_from/toio_32

[ Upstream commit 0f6edfe2bbbb59d161580cb4870fcc46f5490f85 ]

In case count is not multiple of 4, there is a read access in
wil_memcpy_toio_32() from outside src buffer boundary.
In wil_memcpy_fromio_32(), in case count is not multiple of 4, there is
a write access to outside dst io memory boundary.

Fix these issues with proper handling of the last 1 to 4 copied bytes.

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/wil6210/main.c