linux/net/xfrm
Mathias Krause 1f86840f89 xfrm_user: fix info leak in copy_to_user_tmpl()
The memory used for the template copy is a local stack variable. As
struct xfrm_user_tmpl contains multiple holes added by the compiler for
alignment, not initializing the memory will lead to leaking stack bytes
to userland. Add an explicit memset(0) to avoid the info leak.

Initial version of the patch by Brad Spengler.

Cc: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-20 18:08:40 -04:00
..
Kconfig xfrm: make xfrm_algo.c a module 2012-05-15 13:13:34 -04:00
Makefile xfrm: make xfrm_algo.c a module 2012-05-15 13:13:34 -04:00
xfrm_algo.c xfrm_algo: drop an unnecessary inclusion 2012-05-15 13:13:34 -04:00
xfrm_hash.c net: allow GFP_HIGHMEM in __vmalloc() 2010-11-21 10:04:04 -08:00
xfrm_hash.h net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xfrm_input.c xfrm: Workaround incompatibility of ESN and async crypto 2012-09-04 14:09:45 -04:00
xfrm_ipcomp.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
xfrm_output.c xfrm: Remove unused xfrm_state from xfrm_state_check_space 2012-03-22 19:29:58 -04:00
xfrm_policy.c xfrm: fix a read lock imbalance in make_blackhole 2012-09-18 16:30:15 -04:00
xfrm_proc.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
xfrm_replay.c xfrm: Workaround incompatibility of ESN and async crypto 2012-09-04 14:09:45 -04:00
xfrm_state.c net/xfrm/xfrm_state.c: fix error return code 2012-08-31 16:27:48 -04:00
xfrm_sysctl.c net: Convert all sysctl registrations to register_net_sysctl 2012-04-20 21:22:30 -04:00
xfrm_user.c xfrm_user: fix info leak in copy_to_user_tmpl() 2012-09-20 18:08:40 -04:00