提交 04d4fbca 编写于 作者: M Mathias Krause 提交者: David S. Miller

l2tp: fix info leak via getsockname()

The L2TP code for IPv6 fails to initialize the l2tp_unused member of
struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via
the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the
info leak.
Signed-off-by: NMathias Krause <minipli@googlemail.com>
Cc: James Chapman <jchapman@katalix.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 792039c7
...@@ -410,6 +410,7 @@ static int l2tp_ip6_getname(struct socket *sock, struct sockaddr *uaddr, ...@@ -410,6 +410,7 @@ static int l2tp_ip6_getname(struct socket *sock, struct sockaddr *uaddr,
lsa->l2tp_family = AF_INET6; lsa->l2tp_family = AF_INET6;
lsa->l2tp_flowinfo = 0; lsa->l2tp_flowinfo = 0;
lsa->l2tp_scope_id = 0; lsa->l2tp_scope_id = 0;
lsa->l2tp_unused = 0;
if (peer) { if (peer) {
if (!lsk->peer_conn_id) if (!lsk->peer_conn_id)
return -ENOTCONN; return -ENOTCONN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册