All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Cc: edumazet@google.com
Subject: Netfilter owner match breakage
Date: Tue, 27 Aug 2013 13:24:45 -0700	[thread overview]
Message-ID: <20130827202445.GA3114@linuxace.com> (raw)

In commit 90ba9b19 (tcp: tcp_make_synack() can use alloc_skb()), Eric changed
the call to sock_wmalloc in tcp_make_synack to alloc_skb.  In doing so,
the netfilter owner match lost its ability to block the SYNACK packet on
outbound listening sockets.  For example:

[phil@f19_main ~]$ id
uid=1000(phil) gid=1000(phil) groups=1000(phil)

[phil@f19_main ~]$ sudo iptables -A OUTPUT -p tcp -m owner --uid-owner 1000 -j REJECT

[phil@f19_main ~]$ echo hi | nc -l -p 8888

Before this commit, attempting to connect to the port 8888 listener generated
this:

10.10.10.1.47457 > 10.10.10.110.8888: Flags [S], seq 1855270582 [...]
10.10.10.110 > 10.10.10.110: ICMP 10.10.10.1 tcp port 47457 unreachable, length 68

After this commit, the session is established but the first packet of the
session gets rejected:

10.10.10.1.47453 > 10.10.10.110.8888: Flags [S], seq 2089355862 [...]
10.10.10.110.8888 > 10.10.10.1.47453: Flags [S.], seq 2554257713, ack 2089355863 [...]
10.10.10.1.47453 > 10.10.10.110.8888: Flags [.], ack 1, win 115 [...]
10.10.10.110 > 10.10.10.110: ICMP 10.10.10.1 tcp port 47453 unreachable, length 63

Reverting 90ba9b19 (and adjusting for the removal of s_data_desired) fixes the
problem.  Is there a better way to do this?

Phil

             reply	other threads:[~2013-08-27 20:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 20:24 Phil Oester [this message]
2013-08-27 20:43 ` Netfilter owner match breakage Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130827202445.GA3114@linuxace.com \
    --to=kernel@linuxace.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.