public inbox for dccp@vger.kernel.org
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <paul@paul-moore.com>
Cc: <davem@davemloft.net>, <dccp@vger.kernel.org>,
	<dsahern@kernel.org>, <edumazet@google.com>,
	<huw@codeweavers.com>, <kuba@kernel.org>, <kuni1840@gmail.com>,
	<kuniyu@amazon.com>, <linux-security-module@vger.kernel.org>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>
Subject: Re: [PATCH v1 net 2/2] dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
Date: Mon, 30 Oct 2023 14:20:15 -0700	[thread overview]
Message-ID: <20231030212015.57180-1-kuniyu@amazon.com> (raw)
In-Reply-To: <CAHC9VhTrm2shkh=FHcjnqFpDLFCoBwGfsyoSuDH3UFSOeZt+HA@mail.gmail.com>

From: Paul Moore <paul@paul-moore.com>
Date: Mon, 30 Oct 2023 17:12:33 -0400
> On Mon, Oct 30, 2023 at 4:12 PM Kuniyuki Iwashima <kuniyu@amazon.com> wrote:
> >
> > Initially, commit 4237c75c0a35 ("[MLSXFRM]: Auto-labeling of child
> > sockets") introduced security_inet_conn_request() in some functions
> > where reqsk is allocated.  The hook is added just after the allocation,
> > so reqsk's IPv6 remote address was not initialised then.
> >
> > However, SELinux/Smack started to read it in netlbl_req_setattr()
> > after commit e1adea927080 ("calipso: Allow request sockets to be
> > relabelled by the lsm.").
> >
> > Commit 284904aa7946 ("lsm: Relocate the IPv4 security_inet_conn_request()
> > hooks") fixed that kind of issue only in TCPv4 because IPv6 labeling was
> > not supported at that time.  Finally, the same issue was introduced again
> > in IPv6.
> >
> > Let's apply the same fix on DCCPv6 and TCPv6.
> >
> > Fixes: e1adea927080 ("calipso: Allow request sockets to be relabelled by the lsm.")
> > Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
> > ---
> > Cc: Huw Davies <huw@codeweavers.com>
> > Cc: Paul Moore <paul@paul-moore.com>
> > ---
> >  net/dccp/ipv6.c       | 6 +++---
> >  net/ipv6/syncookies.c | 7 ++++---
> >  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> Thanks for catching this and submitting a patch!
> 
> It seems like we should also update dccp_v4_conn_request(), what do you think?

Yes, and it's done in patch 1 as it had a separate Fixes tag.
https://lore.kernel.org/netdev/20231030201042.32885-2-kuniyu@amazon.com/

It seems get_maintainers.pl suggested another email address of
yours for patch 1.  It would be good to update .mailmap ;)

Thanks!

  reply	other threads:[~2023-10-30 21:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 20:10 [PATCH v1 net 0/2] dccp/tcp: Relocate security_inet_conn_request() Kuniyuki Iwashima
2023-10-30 20:10 ` [PATCH v1 net 1/2] dccp: Call security_inet_conn_request() after setting IPv4 addresses Kuniyuki Iwashima
2023-10-30 20:10 ` [PATCH v1 net 2/2] dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses Kuniyuki Iwashima
2023-10-30 21:12   ` Paul Moore
2023-10-30 21:20     ` Kuniyuki Iwashima [this message]
2023-10-30 22:00       ` Paul Moore
2023-11-02 12:10 ` [PATCH v1 net 0/2] dccp/tcp: Relocate security_inet_conn_request() patchwork-bot+netdevbpf

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=20231030212015.57180-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dccp@vger.kernel.org \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=huw@codeweavers.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paul@paul-moore.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