diff options
author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2017-02-22 15:31:45 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-08-07 11:23:09 -0500 |
commit | 8286d6b14c7c0e2c52d565a8727f6028a487fcf0 (patch) | |
tree | 23b540911b1e9c8a1df88ddc0a9796a17eb2b483 /fs/dlm/user.c | |
parent | aae4e7a8bc44722fe70d58920a36916b1043195e (diff) | |
download | linux-stable-8286d6b14c7c0e2c52d565a8727f6028a487fcf0.tar.gz linux-stable-8286d6b14c7c0e2c52d565a8727f6028a487fcf0.tar.bz2 linux-stable-8286d6b14c7c0e2c52d565a8727f6028a487fcf0.zip |
dlm: Fix kernel memory disclosure
Clear the 'unused' field and the uninitialized padding in 'lksb' to
avoid leaking memory to userland in copy_result_to_user().
Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r-- | fs/dlm/user.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index 23488f559cf9..322a6bcd70a2 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -123,6 +123,8 @@ static void compat_input(struct dlm_write_request *kb, static void compat_output(struct dlm_lock_result *res, struct dlm_lock_result32 *res32) { + memset(res32, 0, sizeof(*res32)); + res32->version[0] = res->version[0]; res32->version[1] = res->version[1]; res32->version[2] = res->version[2]; |