]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm_user: fix info leak in xfrm_notify_sa()
authorMathias Krause <minipli@googlemail.com>
Sat, 26 Aug 2017 15:08:58 +0000 (17:08 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 28 Aug 2017 08:58:02 +0000 (10:58 +0200)
commit45880131394001e60b1deafddbd88407e478b8d6
treec54e85cb149711b653ef3953d6dbe18e4d444615
parent565efdc3d6535b8c8a5ebfe67e1d69ffbbd7ed85
xfrm_user: fix info leak in xfrm_notify_sa()

The memory reserved to dump the ID of the xfrm state includes a padding
byte in struct xfrm_usersa_id added by the compiler for alignment. To
prevent the heap info leak, memset(0) the whole struct before filling
it.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Fixes: 15833a0efda4 ("[IPSEC]: Add XFRMA_SA/XFRMA_POLICY for delete notification")
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_user.c