diff options
author | Eugene Teo <eugeneteo@kernel.sg> | 2009-02-23 18:38:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-23 18:38:41 -0500 |
commit | 50fee1dec5d71b8a14c1b82f2f42e16adc227f8b (patch) | |
tree | 8eab115c8416a266e054c403163dc6aac0400943 /net | |
parent | ebe47d47b7b7fed72dabcce4717da727b4e2367d (diff) |
net: amend the fix for SO_BSDCOMPAT gsopt infoleak
The fix for CVE-2009-0676 (upstream commit df0bca04) is incomplete. Note
that the same problem of leaking kernel memory will reappear if someone
on some architecture uses struct timeval with some internal padding (for
example tv_sec 64-bit and tv_usec 32-bit) --- then, you are going to
leak the padded bytes to userspace.
Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 6e4f14d1ef81..5f97caa158e8 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -696,7 +696,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
696 | if (len < 0) | 696 | if (len < 0) |
697 | return -EINVAL; | 697 | return -EINVAL; |
698 | 698 | ||
699 | v.val = 0; | 699 | memset(&v, 0, sizeof(v)); |
700 | 700 | ||
701 | switch(optname) { | 701 | switch(optname) { |
702 | case SO_DEBUG: | 702 | case SO_DEBUG: |