Skip to content
Commit 4fbfeb8b authored by Hoeun Ryu's avatar Hoeun Ryu Committed by Kees Cook
Browse files

usercopy: add testcases to check zeroing on failure



During usercopy the destination buffer will be zeroed if copy_from_user()
or get_user() fails. This patch adds testcases for it. The destination
buffer is set with non-zero value before illegal copy_from_user() or
get_user() is executed and the buffer is compared to zero after usercopy
is done.

Signed-off-by: default avatarHoeun Ryu <hoeun.ryu@gmail.com>
[kees: clarified commit log, dropped second kmalloc]
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 0c744ea4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment