dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/sparc64
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
..
boot Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kernel Revert "[PATCH] PCI: restore BAR values..." 2005-08-08 18:46:09 -07:00
lib [SPARC64]: Avoid membar instructions in delay slots. 2005-06-27 15:42:04 -07:00
math-emu Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mm [SPARC64]: Fix ugly dependency on NR_CPUS being a power-of-2. 2005-07-27 16:08:44 -07:00
oprofile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
prom Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
solaris [NET]: Fix memory leak in sys_{send,recv}msg() w/compat 2005-08-09 15:29:19 -07:00
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6 2005-07-12 15:54:36 -07:00
Kconfig.debug Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
defconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00