[PATCH] NETFILTER: Fix small information leak in SO_ORIGINAL_DST (CVE-2006-1343)
It appears that sockaddr_in.sin_zero is not zeroed during getsockopt(...SO_ORIGINAL_DST...) operation. This can lead to an information leak (CVE-2006-1343). Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
This commit is contained in:
committed by
Chris Wright
parent
b7d061792b
commit
11091f6a4a
@@ -1318,6 +1318,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len)
|
||||
.tuple.dst.u.tcp.port;
|
||||
sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL]
|
||||
.tuple.dst.ip;
|
||||
memset(sin.sin_zero, 0, sizeof(sin.sin_zero));
|
||||
|
||||
DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n",
|
||||
NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port));
|
||||
|
||||
@@ -354,6 +354,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len)
|
||||
.tuple.dst.u.tcp.port;
|
||||
sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL]
|
||||
.tuple.dst.u3.ip;
|
||||
memset(sin.sin_zero, 0, sizeof(sin.sin_zero));
|
||||
|
||||
DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n",
|
||||
NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port));
|
||||
|
||||
Reference in New Issue
Block a user