kernel-ark/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
cris
frv
h8300
i386 [PATCH] Move the fix to align node_end_pfns to a proper location 2005-08-07 10:00:39 -07:00
ia64
m32r
m68k
m68knommu
mips
parisc
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
sh
sh64
sparc
sparc64 [NET]: Fix memory leak in sys_{send,recv}msg() w/compat 2005-08-09 15:29:19 -07:00
um
v850
x86_64 [PATCH] x86_64: add MODULE_ALIAS for aes 2005-08-08 15:29:13 -07:00
xtensa