lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090212.165924.220333032.davem@davemloft.net>
Date:	Thu, 12 Feb 2009 16:59:24 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	clement.lecigne@...asq.com
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt
 try #2

From: Clement LECIGNE <clement.lecigne@...asq.com>
Date: Thu, 12 Feb 2009 13:35:45 +0100

> In function sock_getsockopt() located in net/core/sock.c, optval v.val
> is not correctly initialized and directly returned in userland in case
> we have SO_BSDCOMPAT option set.
> 
> This dummy code should trigger the bug:
> 
> int main(void)
> {
> 	unsigned char buf[4] = { 0, 0, 0, 0 };
> 	int len;
> 	int sock;
> 	sock = socket(33, 2, 2);
> 	getsockopt(sock, 1, SO_BSDCOMPAT, &buf, &len);
> 	printf("%x%x%x%x\n", buf[0], buf[1], buf[2], buf[3]);
> 	close(sock);
> }
> 
> Here is a patch that fix this bug by initalizing v.val just after its declaration.

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ