diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-30 21:42:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-30 21:42:58 -0400 |
commit | 3985c7ce85039adacdf882904ca096f091d39346 (patch) | |
tree | afaf4161c4c3d9516cc09295eb30c0e22a8c3008 /net/socket.c | |
parent | fcf744a96c66ca6ad7301a372034b771e57f30c4 (diff) | |
parent | ce384d91cd7a4269a1ed5d4307a70aa4c6fa14f2 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
isdn: mISDN: socket: fix information leak to userland
netdev: can: Change mail address of Hans J. Koch
pcnet_cs: add new_id
net: Truncate recvfrom and sendto length to INT_MAX.
RDS: Let rds_message_alloc_sgs() return NULL
RDS: Copy rds_iovecs into kernel memory instead of rereading from userspace
RDS: Clean up error handling in rds_cmsg_rdma_args
RDS: Return -EINVAL if rds_rdma_pages returns an error
net: fix rds_iovec page count overflow
can: pch_can: fix section mismatch warning by using a whitelisted name
can: pch_can: fix sparse warning
netxen_nic: Fix the tx queue manipulation bug in netxen_nic_probe
ip_gre: fix fallback tunnel setup
vmxnet: trivial annotation of protocol constant
vmxnet3: remove unnecessary byteswapping in BAR writing macros
ipv6/udp: report SndbufErrors and RcvbufErrors
phy/marvell: rename 88ec048 to 88e1318s and fix mscr1 addr
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 5247ae10f374..3ca2fd9e3720 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1652,6 +1652,8 @@ SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len, | |||
1652 | struct iovec iov; | 1652 | struct iovec iov; |
1653 | int fput_needed; | 1653 | int fput_needed; |
1654 | 1654 | ||
1655 | if (len > INT_MAX) | ||
1656 | len = INT_MAX; | ||
1655 | sock = sockfd_lookup_light(fd, &err, &fput_needed); | 1657 | sock = sockfd_lookup_light(fd, &err, &fput_needed); |
1656 | if (!sock) | 1658 | if (!sock) |
1657 | goto out; | 1659 | goto out; |
@@ -1709,6 +1711,8 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, | |||
1709 | int err, err2; | 1711 | int err, err2; |
1710 | int fput_needed; | 1712 | int fput_needed; |
1711 | 1713 | ||
1714 | if (size > INT_MAX) | ||
1715 | size = INT_MAX; | ||
1712 | sock = sockfd_lookup_light(fd, &err, &fput_needed); | 1716 | sock = sockfd_lookup_light(fd, &err, &fput_needed); |
1713 | if (!sock) | 1717 | if (!sock) |
1714 | goto out; | 1718 | goto out; |