* net: amend the fix for SO_BSDCOMPAT gsopt infoleak
@ 2009-02-23 16:41 Eugene Teo
2009-02-23 23:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eugene Teo @ 2009-02-23 16:41 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: mpatocka
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>
diff --git a/net/core/sock.c b/net/core/sock.c
index 6f2e133..913c95f 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,
if (len < 0)
return -EINVAL;
- v.val = 0;
+ memset(&v, 0, sizeof(v));
switch(optname) {
case SO_DEBUG:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: net: amend the fix for SO_BSDCOMPAT gsopt infoleak
2009-02-23 16:41 net: amend the fix for SO_BSDCOMPAT gsopt infoleak Eugene Teo
@ 2009-02-23 23:38 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-02-23 23:38 UTC (permalink / raw)
To: eugeneteo; +Cc: linux-kernel, netdev, mpatocka
From: Eugene Teo <eugeneteo@kernel.sg>
Date: Tue, 24 Feb 2009 00:41:12 +0800
> 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>
Applied and queued up for -stable, thanks Eugene.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-23 23:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 16:41 net: amend the fix for SO_BSDCOMPAT gsopt infoleak Eugene Teo
2009-02-23 23:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).