linux/arch
Andrew Morton d64d387372 [NET]: Fix memory leak in sys_{send,recv}msg() w/compat
From: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>

sendmsg()/recvmsg() syscalls from o32/n32 apps to a 64bit kernel will
cause a kernel memory leak if iov_len > UIO_FASTIOV for each syscall!

This is because both sys_sendmsg() and verify_compat_iovec() kmalloc a
new iovec structure.  Only the one from sys_sendmsg() is free'ed.

I wrote a simple test program to confirm this after identifying the
problem:

http://davej.org/programs/testsendmsg.c

Note that the below fix will break solaris_sendmsg()/solaris_recvmsg() as
it also calls verify_compat_iovec() but expects it to malloc internally.

[ I fixed that. -DaveM ]

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 15:29:19 -07:00
..
alpha [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
arm [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
arm26 It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
cris It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
frv It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
h8300 [PATCH] Don't export machine_restart, machine_halt, or machine_power_off. 2005-07-26 14:35:42 -07:00
i386 [PATCH] Move the fix to align node_end_pfns to a proper location 2005-08-07 10:00:39 -07:00
ia64 [PATCH] remove sys_set_zone_reclaim() 2005-08-01 10:03:56 -07:00
m32r [PATCH] m32r: Fix local-timer event handling 2005-08-01 21:37:59 -07:00
m68k It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
m68knommu [PATCH] Don't export machine_restart, machine_halt, or machine_power_off. 2005-07-26 14:35:42 -07:00
mips [PATCH] mips: remove obsolete GIU driver for vr41xx 2005-07-27 16:25:58 -07:00
parisc It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
ppc [PATCH] ppc32: Fix MPC834x USB memory map offsets 2005-08-08 15:29:13 -07:00
ppc64 [PATCH] ppc64: update defconfigs 2005-08-08 11:46:24 -07:00
s390 [PATCH] s390: ioprio & inotify system calls. 2005-08-01 21:37:59 -07:00
sh [PATCH] try_to_freeze() call fixes 2005-07-27 16:25:49 -07:00
sh64 It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
sparc [SPARC]: Add inotify syscall entries. 2005-07-27 14:14:39 -07:00
sparc64 [NET]: Fix memory leak in sys_{send,recv}msg() w/compat 2005-08-09 15:29:19 -07:00
um [PATCH] uml: fix vsyscall brokenness 2005-07-29 15:01:14 -07:00
v850 [PATCH] v850: Update PCI support 2005-07-27 16:26:03 -07:00
x86_64 [PATCH] x86_64: add MODULE_ALIAS for aes 2005-08-08 15:29:13 -07:00
xtensa [PATCH] xtensa: use ssleep() instead of schedule_timeout() 2005-07-12 16:01:01 -07:00