kernel-ark/net
Patrick McHardy 7d6dfe1f5b [IPSEC] Fix xfrm_state leaks in error path
Herbert Xu wrote:
> @@ -1254,6 +1326,7 @@ static int pfkey_add(struct sock *sk, st
>       if (IS_ERR(x))
>               return PTR_ERR(x);
>
> +     xfrm_state_hold(x);

This introduces a leak when xfrm_state_add()/xfrm_state_update()
fail. We hold two references (one from xfrm_state_alloc(), one
from xfrm_state_hold()), but only drop one. We need to take the
reference because the reference from xfrm_state_alloc() can
be dropped by __xfrm_state_delete(), so the fix is to drop both
references on error. Same problem in xfrm_user.c.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-18 22:45:31 -07:00
..
802 [TOKENRING]: net/802/tr.c: s/struct rif_cache_s/struct rif_cache/ 2005-05-26 12:59:42 -07:00
8021q
appletalk
atm
ax25
bluetooth
bridge [BRIDGE]: receive path optimization 2005-05-29 14:16:48 -07:00
core Manual merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git 2005-06-18 11:42:35 -07:00
decnet
econet
ethernet
ipv4 [NETFILTER]: ipt_recent: last_pkts is an array of "unsigned long" not "u_int32_t" 2005-06-15 20:51:14 -07:00
ipv6 [IPv6] Don't generate temporary for TUN devices 2005-06-13 15:01:34 -07:00
ipx
irda
key [IPSEC] Fix xfrm_state leaks in error path 2005-06-18 22:45:31 -07:00
lapb
llc
netlink [NETLINK]: Defer socket destruction a bit 2005-05-19 13:07:32 -07:00
netrom
packet
rose
rxrpc
sched [NET]: Move the netdev list to vger.kernel.org. 2005-06-13 14:30:40 -07:00
sctp [SCTP] Fix incorrect setting of sk_bound_dev_if when binding/sending to a ipv6 2005-06-13 15:13:05 -07:00
sunrpc
unix [AF_UNIX]: Use lookup_create(). 2005-05-19 12:26:43 -07:00
wanrouter
x25
xfrm [IPSEC] Fix xfrm_state leaks in error path 2005-06-18 22:45:31 -07:00
compat.c
Kconfig
Makefile
nonet.c
socket.c AUDIT: Fix user pointer deref thinko in sys_socketcall(). 2005-06-02 12:13:21 +01:00
sysctl_net.c
TUNABLE