Commit 8bd22e22 authored by Yasuyuki Kozakai's avatar Yasuyuki Kozakai Committed by Patrick McHardy

[NETFILTER]: Enable ip6t_LOG.c to work without skb_linearize()

This patch enables ip6t_LOG.c to work without skb_linearize().

I changed a large part of this file. At first, ip6_nexthdr() is deleted
to prevent multiple call of skb_header_pointer() at dump_packet() and
ip6_nexthdr().
   
And the following bugs are fixed. The first bug is fixed by introducing
skb_header_pointer(), then I didn't separate patches.

    - No check with skb->len. Then invalid memory access may occur.

    - If packet is fragmented and it's not first fragment, nonexistent
      extension headers is tried to parse.

    - All headers which aren't TCP/UDP/ICMPv6 are treated as IPv6
      extension header.
  
    - The encrypted data after ESP is tried to parse.
   
    - ntohl() for ID in Fragment header is missing.
   
    - If doff*4 of TCP header is less than sizeof(struct tcphdr),
      TCP options are tried to parse.
Signed-off-by: default avatarYasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 5c1ee973
This diff is collapsed.
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