OSDN Git Service

af_key: Fix heap information leak
authorHyunwoo Kim <v4bel@theori.io>
Thu, 9 Feb 2023 09:16:48 +0000 (01:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2023 09:30:14 +0000 (09:30 +0000)
commit2f4796518315ab246638db8feebfcb494212e7ee
tree20d28a99237d7c4eb386e9b56f3989d5fc5d757c
parent20ab8432420e51f1adce23027121efd5478d0ba3
af_key: Fix heap information leak

Since x->encap of pfkey_msg2xfrm_state() is not
initialized to 0, kernel heap data can be leaked.

Fix with kzalloc() to prevent this.

Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/key/af_key.c