mmc: card: fix arbitrary write via read handler in mmc_block_test
In mmc_block_test, the debug_fs based read function handlers write to an
arbitrary buffer which is given by any user. We add an access_ok check
to verify that the address pointed by *buffer is not in kernel space.
Only if the buffer is valid, do we continue the read handler.
Change-Id: I35fe9bb70df8de92cb4d3b15c851aa9131a0e8d9
Signed-off-by:
Lee Susman <lsusman@codeaurora.org>
Loading
Please register or sign in to comment