Commit 74784da8 authored by David S. Miller's avatar David S. Miller

Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

Pablo Neira Ayuso says:

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

The following patchset contains two one-liner fixes for your net tree,
they are:

1) Disable fast hash operations for 2-bytes length keys which is leading
   to incorrect lookups in nf_tables, from Anatole Denis.

2) Reload pointer ipv4 header after ip_route_me_harder() given this may
   result in use-after-free due to skbuff header reallocation, patch
   from Tejaswi Tanikella.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 18129a24 7400bb4b
...@@ -132,6 +132,8 @@ void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook) ...@@ -132,6 +132,8 @@ void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook)
if (ip_route_me_harder(net, nskb, RTN_UNSPEC)) if (ip_route_me_harder(net, nskb, RTN_UNSPEC))
goto free_nskb; goto free_nskb;
niph = ip_hdr(nskb);
/* "Never happens" */ /* "Never happens" */
if (nskb->len > dst_mtu(skb_dst(nskb))) if (nskb->len > dst_mtu(skb_dst(nskb)))
goto free_nskb; goto free_nskb;
......
...@@ -643,7 +643,6 @@ nft_hash_select_ops(const struct nft_ctx *ctx, const struct nft_set_desc *desc, ...@@ -643,7 +643,6 @@ nft_hash_select_ops(const struct nft_ctx *ctx, const struct nft_set_desc *desc,
{ {
if (desc->size) { if (desc->size) {
switch (desc->klen) { switch (desc->klen) {
case 2:
case 4: case 4:
return &nft_hash_fast_ops; return &nft_hash_fast_ops;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment