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

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 sa_id before filling it.

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Fixes: ed4d9906bc3c ("[IPSEC]: Sync series - user")
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_user.c