mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
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>
This commit is contained in:
parent
aae4e7a8bc
commit
8286d6b14c
1 changed files with 2 additions and 0 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue