mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
ebe47d47b7
commit
50fee1dec5
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue