diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-04-07 01:51:55 +0000 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2013-04-30 18:11:34 +0100 |
commit | a05794b437480c0ec5263cdbd6f20c8e56253364 (patch) | |
tree | ef47c5a031c9099c2ef9525221b018024632f9a8 /net | |
parent | b3eedc4c6612a612513a65e2da1d48f7d38b6c76 (diff) |
l2tp: fix info leak in l2tp_ip6_recvmsg()
commit b860d3cc62877fad02863e2a08efff69a19382d2 upstream.
The L2TP code for IPv6 fails to initialize the l2tp_conn_id member of
struct sockaddr_l2tpip6 and therefore leaks four bytes kernel stack
in l2tp_ip6_recvmsg() in case msg_name is set.
Initialize l2tp_conn_id with 0 to avoid the info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/l2tp/l2tp_ip6.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c index 927547171bc7..2c9ccce11a27 100644 --- a/net/l2tp/l2tp_ip6.c +++ b/net/l2tp/l2tp_ip6.c @@ -684,6 +684,7 @@ static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk, lsa->l2tp_addr = ipv6_hdr(skb)->saddr; lsa->l2tp_flowinfo = 0; lsa->l2tp_scope_id = 0; + lsa->l2tp_conn_id = 0; if (ipv6_addr_type(&lsa->l2tp_addr) & IPV6_ADDR_LINKLOCAL) lsa->l2tp_scope_id = IP6CB(skb)->iif; } |