Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ee653f6 authored by David S. Miller's avatar David S. Miller
Browse files


Steffen Klassert says:

====================
pull request (net): ipsec 2018-10-18

1) Free the xfrm interface gro_cells when deleting the
   interface, otherwise we leak it. From Li RongQing.

2) net/core/flow.c does not exist anymore, so remove it
   from the MAINTAINERS file.

3) Fix a slab-out-of-bounds in _decode_session6.
   From Alexei Starovoitov.

4) Fix RCU protection when policies inserted into
   thei bydst lists. From Florian Westphal.

Please pull or let me know if there are problems.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents eddf016b 9dffff20
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -10122,7 +10122,6 @@ L: netdev@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git
S:	Maintained
F:	net/core/flow.c
F:	net/xfrm/
F:	net/key/
F:	net/ipv4/xfrm*
+2 −2
Original line number Diff line number Diff line
@@ -146,8 +146,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
	fl6->daddr = reverse ? hdr->saddr : hdr->daddr;
	fl6->saddr = reverse ? hdr->daddr : hdr->saddr;

	while (nh + offset + 1 < skb->data ||
	       pskb_may_pull(skb, nh + offset + 1 - skb->data)) {
	while (nh + offset + sizeof(*exthdr) < skb->data ||
	       pskb_may_pull(skb, nh + offset + sizeof(*exthdr) - skb->data)) {
		nh = skb_network_header(skb);
		exthdr = (struct ipv6_opt_hdr *)(nh + offset);

+3 −0
Original line number Diff line number Diff line
@@ -116,6 +116,9 @@ static void xfrmi_unlink(struct xfrmi_net *xfrmn, struct xfrm_if *xi)

static void xfrmi_dev_free(struct net_device *dev)
{
	struct xfrm_if *xi = netdev_priv(dev);

	gro_cells_destroy(&xi->gro_cells);
	free_percpu(dev->tstats);
}

+4 −4
Original line number Diff line number Diff line
@@ -632,9 +632,9 @@ static void xfrm_hash_rebuild(struct work_struct *work)
				break;
		}
		if (newpos)
			hlist_add_behind(&policy->bydst, newpos);
			hlist_add_behind_rcu(&policy->bydst, newpos);
		else
			hlist_add_head(&policy->bydst, chain);
			hlist_add_head_rcu(&policy->bydst, chain);
	}

	spin_unlock_bh(&net->xfrm.xfrm_policy_lock);
@@ -774,9 +774,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
			break;
	}
	if (newpos)
		hlist_add_behind(&policy->bydst, newpos);
		hlist_add_behind_rcu(&policy->bydst, newpos);
	else
		hlist_add_head(&policy->bydst, chain);
		hlist_add_head_rcu(&policy->bydst, chain);
	__xfrm_policy_link(policy, dir);

	/* After previous checking, family can either be AF_INET or AF_INET6 */