[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 17/24] linux-user: fd_trans_host_to_target_data()
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL v2 17/24] linux-user: fd_trans_host_to_target_data() must process only received data |
Date: |
Tue, 28 Jun 2016 22:12:51 +0300 |
From: Laurent Vivier <address@hidden>
if we process the whole buffer, the netlink helpers can try
to swap invalid data.
Signed-off-by: Laurent Vivier <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
linux-user/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 33409c0..4b0d791 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2991,7 +2991,7 @@ static abi_long do_sendrecvmsg_locked(int fd, struct
target_msghdr *msgp,
len = ret;
if (fd_trans_host_to_target_data(fd)) {
ret = fd_trans_host_to_target_data(fd)(msg.msg_iov->iov_base,
- msg.msg_iov->iov_len);
+ len);
} else {
ret = host_to_target_cmsg(msgp, &msg);
}
--
2.1.4
- [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl, (continued)
- [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 06/24] configure: Don't allow user-only targets for unknown CPU architectures, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 07/24] user-exec: Delete now-unused hppa and m68k cpu_signal_handler() code, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 11/24] linux-user: Support F_GETPIPE_SZ and F_SETPIPE_SZ fcntls, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 09/24] linux-user: Create a hostdep.h for each host architecture, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 10/24] linux-user: Fix wrong type used for argument to rt_sigqueueinfo, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 13/24] linux-user: add socket() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 15/24] linux-user: update get_thread_area/set_thread_area strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 14/24] linux-user: fix clone() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 12/24] linux-user: add socketcall() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 17/24] linux-user: fd_trans_host_to_target_data() must process only received data,
riku . voipio <=
- [Qemu-devel] [PULL v2 18/24] linux-user: don't swap NLMSG_DATA() fields, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 16/24] linux-user: add missing return in netlink switch statement, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 21/24] linux-user: Provide safe_syscall for arm, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 20/24] linux-user: Provide safe_syscall for i386, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 22/24] linux-user: Provide safe_syscall for aarch64, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 24/24] linux-user: Provide safe_syscall for ppc64, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 19/24] linux-user: fix x86_64 safe_syscall, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 23/24] linux-user: Provide safe_syscall for s390x, riku . voipio, 2016/06/28
- Re: [Qemu-devel] [PULL v2 00/24] linux-user changes for v2.7, Peter Maydell, 2016/06/29