From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: eparis@parisplace.org, paul@paul-moore.com,
casey@schaufler-ca.com, johnstul@us.ibm.com, serge@hallyn.com,
linux-kernel@vger.kernel.org, james.l.morris@oracle.com,
selinux@tycho.nsa.gov, john.johansen@canonical.com,
linux-security-module@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: tcp: unicast_sock should not land outside of TCP stack
Date: Thu, 09 Aug 2012 21:05:46 -0700 (PDT) [thread overview]
Message-ID: <20120809.210546.819623704116134361.davem@davemloft.net> (raw)
In-Reply-To: <1344556566.31104.808.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 10 Aug 2012 01:56:06 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> commit be9f4a44e7d41cee (ipv4: tcp: remove per net tcp_sock) added a
> selinux regression, reported and bisected by John Stultz
>
> selinux_ip_postroute_compat() expect to find a valid sk->sk_security
> pointer, but this field is NULL for unicast_sock
>
> It turns out that unicast_sock are really temporary stuff to be able
> to reuse part of IP stack (ip_append_data()/ip_push_pending_frames())
>
> Fact is that frames sent by ip_send_unicast_reply() should be orphaned
> to not fool LSM.
>
> Note IPv6 never had this problem, as tcp_v6_send_response() doesnt use a
> fake socket at all. I'll probably implement tcp_v4_send_response() to
> remove these unicast_sock in linux-3.7
>
> Reported-by: John Stultz <johnstul@us.ibm.com>
> Bisected-by: John Stultz <johnstul@us.ibm.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
prev parent reply other threads:[~2012-08-10 4:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50215A7E.8000701@linaro.org>
[not found] ` <1344462889.28967.328.camel@edumazet-glaptop>
[not found] ` <5022FD9A.4020603@schaufler-ca.com>
[not found] ` <1695034.0lrQgQPOMT@sifl>
2012-08-09 14:50 ` [PATCH] ipv4: tcp: security_sk_alloc() needed for unicast_sock Eric Dumazet
2012-08-09 15:07 ` Paul Moore
2012-08-09 15:36 ` Eric Dumazet
2012-08-09 15:59 ` Paul Moore
2012-08-09 16:05 ` Eric Paris
2012-08-09 16:09 ` Paul Moore
2012-08-09 17:46 ` Eric Dumazet
2012-08-09 20:06 ` Eric Paris
[not found] ` <CACLa4ptkvKj2GT4ZL+msMuWOHW885Hugk8nz3hvptOoY9-totw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-09 20:19 ` Paul Moore
2012-08-09 21:29 ` Eric Dumazet
2012-08-09 21:53 ` Casey Schaufler
2012-08-09 22:05 ` Eric Dumazet
2012-08-09 22:26 ` Casey Schaufler
2012-08-09 23:38 ` David Miller
2012-08-09 23:56 ` [PATCH] ipv4: tcp: unicast_sock should not land outside of TCP stack Eric Dumazet
2012-08-10 4:05 ` David Miller [this message]
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=20120809.210546.819623704116134361.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=casey@schaufler-ca.com \
--cc=eparis@parisplace.org \
--cc=eric.dumazet@gmail.com \
--cc=james.l.morris@oracle.com \
--cc=john.johansen@canonical.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=selinux@tycho.nsa.gov \
--cc=serge@hallyn.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).