kernel-ark/net
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
..
802 [NET]: __be'ify *_type_trans() 2005-07-12 12:08:43 -07:00
8021q [VLAN]: Fix early vlan adding leads to not functional device 2005-07-12 12:13:49 -07:00
appletalk
atm [ATM]: Trivial spelling fix patch for net/Kconfig 2005-07-19 13:56:53 -07:00
ax25
bluetooth [Bluetooth] Add direction and timestamp to stack internal events 2005-08-06 12:36:54 +02:00
bridge [NET]: BRIDGE_EBT_ARPREPLY must depend on INET 2005-07-19 14:00:13 -07:00
core [NET] Fix too aggressive backoff in dst garbage collection 2005-07-30 17:47:25 -07:00
decnet
econet
ethernet [NET]: __be'ify *_type_trans() 2005-07-12 12:08:43 -07:00
ipv4 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-08-08 16:06:01 -07:00
ipv6 [IPSEC]: Restrict socket policy loading to CAP_NET_ADMIN. 2005-08-06 06:33:15 -07:00
ipx
irda
key
lapb
llc
netlink [NETLINK]: Fix "nocast type" warnings 2005-07-18 13:35:43 -07:00
netrom
packet
rose
rxrpc
sched [EMATCH]: Remove feature ifdefs in meta ematch. 2005-07-24 19:44:23 -07:00
sctp [SCTP]: Fix potential null pointer dereference while handling an icmp error 2005-07-18 13:44:10 -07:00
sunrpc [SUNRPC]: Fix nsec --> usec conversion. 2005-08-09 14:57:12 -07:00
unix
wanrouter [NET]: __be'ify *_type_trans() 2005-07-12 12:08:43 -07:00
x25
xfrm [XFRM]: Fix possible overflow of sock->sk_policy 2005-07-26 15:43:17 -07:00
compat.c [NET]: Fix memory leak in sys_{send,recv}msg() w/compat 2005-08-09 15:29:19 -07:00
Kconfig [NET]: Kconfig: NETCONSOLE and NETPOLL together 2005-07-18 13:45:12 -07:00
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE