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
| ||
|
Date: Mon, 13 Dec 2010 00:48:25 +0100 (CET) From: Andi Kleen <andi@...stfloor.org> To: torvalds@...ux-foundation.org, davem@...emloft.net, gregkh@...e.de, ak@...ux.intel.com, linux-kernel@...r.kernel.org, stable@...nel.org Subject: [PATCH] [199/223] net: Truncate recvfrom and sendto length to INT_MAX. 2.6.35-longterm review patch. If anyone has any objections, please let me know. ------------------ From: Linus Torvalds <torvalds@...ux-foundation.org> commit 253eacc070b114c2ec1f81b067d2fed7305467b0 upstream. Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org> Signed-off-by: David S. Miller <davem@...emloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de> Signed-off-by: Andi Kleen <ak@...ux.intel.com> --- net/socket.c | 4 ++++ 1 file changed, 4 insertions(+) Index: linux/net/socket.c =================================================================== --- linux.orig/net/socket.c +++ linux/net/socket.c @@ -1652,6 +1652,8 @@ SYSCALL_DEFINE6(sendto, int, fd, void __ struct iovec iov; int fput_needed; + if (len > INT_MAX) + len = INT_MAX; sock = sockfd_lookup_light(fd, &err, &fput_needed); if (!sock) goto out; @@ -1709,6 +1711,8 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void int err, err2; int fput_needed; + if (size > INT_MAX) + size = INT_MAX; sock = sockfd_lookup_light(fd, &err, &fput_needed); if (!sock) goto out; -- 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