Hi David, Steffen,
the following series fixes a few info leaks due to missing padding byte
initialization in the xfrm_user netlink interface.
Please apply!
Mathias Krause (4):
xfrm_user: fix info leak in copy_user_offload()
xfrm_user: fix info leak in xfrm_notify_sa()
xfrm_user: fix info leak in build_expire()
xfrm_user: fix info leak in build_aevent()
net/xfrm/xfrm_user.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
1.7.10.4
The memory reserved to dump the xfrm offload state includes padding
bytes of struct xfrm_user_offload added by the compiler for alignment.
Add an explicit memset(0) before filling the buffer to avoid the heap
info leak.
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API")
Signed-off-by: Mathias Krause <redacted>
---
net/xfrm/xfrm_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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: 0603eac0d6b7 ("[IPSEC]: Add XFRMA_SA/XFRMA_POLICY for delete notification")
Signed-off-by: Mathias Krause <redacted>
---
net/xfrm/xfrm_user.c | 1 +
1 file changed, 1 insertion(+)
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: Mathias Krause <redacted>
---
net/xfrm/xfrm_user.c | 2 ++
1 file changed, 2 insertions(+)
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: d51d081d6504 ("[IPSEC]: Sync series - user")
Signed-off-by: Mathias Krause <redacted>
---
net/xfrm/xfrm_user.c | 1 +
1 file changed, 1 insertion(+)
On 26 August 2017 at 17:58, Joe Perches [off-list ref] wrote:
On Sat, 2017-08-26 at 17:08 +0200, Mathias Krause wrote:
quoted
Hi David, Steffen,
the following series fixes a few info leaks due to missing padding byte
initialization in the xfrm_user netlink interface.
Were these found by inspection or by some tool?
If by tool, perhaps there are other _to_user cases?
I found the one in the offload API by manual inspection, looked around
a little and found the others. No tool involved.
I already looked at the xfrm_user API back in 2012 and fixed quite a
few info leaks but missed the ones in the netlink multicast
notification code :/
Regards,
Mathias
Hi David, Steffen,
the following series fixes a few info leaks due to missing padding byte
initialization in the xfrm_user netlink interface.
Please apply!
Steffen please pick this up if you haven't already.
Thank you.
Hi David, Steffen,
the following series fixes a few info leaks due to missing padding byte
initialization in the xfrm_user netlink interface.
Please apply!
Steffen please pick this up if you haven't already.
I had it already in the ipsec/testing branch, now merged into
ipsec/master.
Thanks everyone!