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: <20140930.005925.995989898229686123.davem@davemloft.net>
Date:	Tue, 30 Sep 2014 00:59:25 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	samuel.thibault@...-lyon.org
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] Fix getsockopt(SO_PEERNAME) buffer size against
 potential future buffer overflow

From: Samuel Thibault <samuel.thibault@...-lyon.org>
Date: Sun, 28 Sep 2014 15:55:45 +0200

> In net/core/sock.c's sock_getsockopt, the address buffer size is
> hardcoded to 128. It happens that sizeof(struct sockaddr_storage) is
> indeed 128, but that is just luck and would probably not get updated
> whenever sockaddr_storage would grow. This patch makes it simply use
> sockaddr_storage instead.
> 
> Signed-off-by:  Samuel Thibault <samuel.thibault@...-lyon.org>

sockaddr_storage's size is a user exported API and therefore can
never, ever, change.

If you want to change 128 to _K_SS_MAXSIZE or similar, fine.
--
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