aha/net
Chuck Lever abc5c44d62 SUNRPC: Fix error return value of svc_addr_len()
The svc_addr_len() helper function returns -EAFNOSUPPORT if it doesn't
recognize the address family of the passed-in socket address.  However,
the return type of this function is size_t, which means -EAFNOSUPPORT
is turned into a very large positive value in this case.

The check in svc_udp_recvfrom() to see if the return value is less
than zero therefore won't work at all.

Additionally, handle_connect_req() passes this value directly to
memset().  This could cause memset() to clobber a large chunk of memory
if svc_addr_len() has returned an error.  Currently the address family
of these addresses, however, is known to be supported long before
handle_connect_req() is called, so this isn't a real risk.

Change the error return value of svc_addr_len() to zero, which fits in
the range of size_t, and is safer to pass to memset() directly.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-04-28 13:54:25 -04:00
..
9p
802 tr: fix leakage of device in net/802/tr.c 2009-04-11 01:43:17 -07:00
8021q gro: Normalise skb before bypassing GRO on netpoll VLAN path 2009-04-13 15:44:50 -07:00
appletalk
atm
ax25
bluetooth proc tty: remove struct tty_operations::read_proc 2009-04-01 08:59:10 -07:00
bridge
can
core gro: Restore correct value to gso_size 2009-04-14 15:11:06 -07:00
dcb
dccp
decnet
dsa
econet
ethernet
ipv4 tcp: fix >2 iw selection 2009-04-14 02:08:53 -07:00
ipv6 ipv6:remove useless check 2009-04-14 02:21:41 -07:00
ipx
irda
iucv
key
lapb
llc
mac80211
netfilter netfilter: ctnetlink: fix regression in expectation handling 2009-04-06 17:47:20 +02:00
netlabel
netlink
netrom
packet packet: avoid warnings when high-order page allocation fails 2009-04-15 03:39:52 -07:00
phonet
rds FRV: Fix the section attribute on UP DECLARE_PER_CPU() 2009-04-21 19:39:59 -07:00
rfkill
rose Revert "rose: zero length frame filtering in af_rose.c" 2009-04-14 20:28:00 -07:00
rxrpc
sched netsched: Allow meta match on vlan tag on receive 2009-04-13 18:12:57 -07:00
sctp
sunrpc SUNRPC: Fix error return value of svc_addr_len() 2009-04-28 13:54:25 -04:00
tipc
unix
wanrouter
wimax
wireless
x25
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-04-06 18:05:43 -07:00
sysctl_net.c
TUNABLE