Skip to content
Commit e3e5fc16 authored by Mathias Krause's avatar Mathias Krause Committed by Steffen Klassert
Browse files

xfrm_user: fix info leak in build_expire()



The memory reserved to dump the expired xfrm state includes padding
bytes in struct xfrm_user_expire added by the compiler for alignment. To
prevent the heap info leak, memset(0) the remainder of the struct.
Initializing the whole structure isn't needed as copy_to_user_state()
already takes care of clearing the padding bytes within the 'state'
member.

Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 50329c8a
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