lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 1 Jul 2020 17:49:42 -0400
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>, Martin Lau <kafai@...com>
Subject: Re: [PATCH net] ip: Fix SO_MARK in RST, ACK and ICMP packets

On Wed, Jul 1, 2020 at 5:26 PM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> On Wed, Jul 1, 2020 at 4:00 PM Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
> >
> > From: Willem de Bruijn <willemb@...gle.com>
> >
> > When no full socket is available, skbs are sent over a per-netns
> > control socket. Its sk_mark is temporarily adjusted to match that
> > of the real (request or timewait) socket or to reflect an incoming
> > skb, so that the outgoing skb inherits this in __ip_make_skb.
> >
> > Introduction of the socket cookie mark field broke this. Now the
> > skb is set through the cookie and cork:
> >
> > <caller>                # init sockc.mark from sk_mark or cmsg
> > ip_append_data
> >   ip_setup_cork         # convert sockc.mark to cork mark
> > ip_push_pending_frames
> >   ip_finish_skb
> >     __ip_make_skb       # set skb->mark to cork mark
> >
> > But I missed these special control sockets. Update all callers of
> > __ip(6)_make_skb that were originally missed.
> >
> > For IPv6, the same two icmp(v6) paths are affected. The third
> > case is not, as commit 92e55f412cff ("tcp: don't annotate
> > mark on control socket from tcp_v6_send_response()") replaced
> > the ctl_sk->sk_mark with passing the mark field directly as a
> > function argument. That commit predates the commit that
> > introduced the bug.
> >
> > Fixes: c6af0c227a22 ("ip: support SO_MARK cmsg")
> > Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> > Reported-by: Martin KaFai Lau <kafai@...com>
>
> I spotted another missing case, in ping_v6_sendmsg. Will have to send a v2.

Turns out, that case is indeed missing, but never existed in the first place.
I can send a separate patch to net-next to add it.

That means that this patch is good as is.

Powered by blists - more mailing lists