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

Commit 39376ccb authored by David S. Miller's avatar David S. Miller
Browse files


Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for your net tree,
they are:

1) Fix a crash in nf_tables when dictionaries are used from the ruleset,
   due to memory corruption, from Florian Westphal.

2) Fix another crash in nf_queue when used with br_netfilter. Also from
   Florian.

Both fixes are related to new stuff that got in 4.0-rc.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 876a7ae6 547c4b54
Loading
Loading
Loading
Loading
+14 −2
Original line number Original line Diff line number Diff line
@@ -39,12 +39,24 @@ static inline void br_drop_fake_rtable(struct sk_buff *skb)


static inline int nf_bridge_get_physinif(const struct sk_buff *skb)
static inline int nf_bridge_get_physinif(const struct sk_buff *skb)
{
{
	return skb->nf_bridge ? skb->nf_bridge->physindev->ifindex : 0;
	struct nf_bridge_info *nf_bridge;

	if (skb->nf_bridge == NULL)
		return 0;

	nf_bridge = skb->nf_bridge;
	return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0;
}
}


static inline int nf_bridge_get_physoutif(const struct sk_buff *skb)
static inline int nf_bridge_get_physoutif(const struct sk_buff *skb)
{
{
	return skb->nf_bridge ? skb->nf_bridge->physoutdev->ifindex : 0;
	struct nf_bridge_info *nf_bridge;

	if (skb->nf_bridge == NULL)
		return 0;

	nf_bridge = skb->nf_bridge;
	return nf_bridge->physoutdev ? nf_bridge->physoutdev->ifindex : 0;
}
}


static inline struct net_device *
static inline struct net_device *
+1 −2
Original line number Original line Diff line number Diff line
@@ -4340,7 +4340,6 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,
	case NFT_CONTINUE:
	case NFT_CONTINUE:
	case NFT_BREAK:
	case NFT_BREAK:
	case NFT_RETURN:
	case NFT_RETURN:
		desc->len = sizeof(data->verdict);
		break;
		break;
	case NFT_JUMP:
	case NFT_JUMP:
	case NFT_GOTO:
	case NFT_GOTO:
@@ -4355,10 +4354,10 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,


		chain->use++;
		chain->use++;
		data->verdict.chain = chain;
		data->verdict.chain = chain;
		desc->len = sizeof(data);
		break;
		break;
	}
	}


	desc->len = sizeof(data->verdict);
	desc->type = NFT_DATA_VERDICT;
	desc->type = NFT_DATA_VERDICT;
	return 0;
	return 0;
}
}