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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Sep 2023 11:04:34 -0700
From: Jordan Rife <jrife@...gle.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>, davem@...emloft.net, 
	Eric Dumazet <edumazet@...gle.com>, kuba@...nel.org, pabeni@...hat.com, 
	netdev@...r.kernel.org, dborkman@...nel.org
Subject: Re: [PATCH net] net: prevent address overwrite in connect() and sendmsg()

> Please take a stab.

To clarify, the plan is to:

1) Swap out calls to sock->ops->connect() with kernel_connect()
2) Move the address copy to kernel_sendmsg()
3) Swap out calls to sock_sendmsg()/sock->ops->sendmsg() with kernel_sendmsg()

> If it proves at all non-trivial, e.g., in the conversion of arguments
> between kernel_sendmsg and sock_sendmsg/sock->ops->sendmsg, then let's
> submit your original patch. And I will do the conversion in net-next
> instead.

I'll give it a try and see how trivial the changes are.

-Jordan

On Wed, Sep 13, 2023 at 7:03 AM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> On Tue, Sep 12, 2023 at 5:09 PM Jordan Rife <jrife@...gle.com> wrote:
> >
> > > If we take this path, it could be a single patch. The subsystem
> > > maintainers should be CC:ed so that they can (N)ACK it.
> > >
> > > But I do not mean to ask to split it up and test each one separately.
> > >
> > > The change from sock->ops->connect to kernel_connect is certainly
> > > trivial enough that compile testing should suffice.
> >
> > Ack. Thanks for clarifying.
> >
> > > The only question is whether we should pursue your original patch and
> > > accept that this will continue, or one that improves the situation,
> > > but touches more files and thus has a higher risk of merge conflicts.
> > >
> > > I'd like to give others some time to chime in. I've given my opinion,
> > > but it's only one.
> > >
> > > I'd like to give others some time to chime in. I've given my opinion,
> > > but it's only one.
> >
> > Sounds good. I'll wait to hear others' opinions on the best path forward.
>
> No other comments so far.
>
> My hunch is that a short list of these changes
>
> ```
> @@ -1328,7 +1328,7 @@ static int kernel_bindconnect(struct socket *s,
> struct sockaddr *laddr,
>         if (rv < 0)
>                 return rv;
>
> -       rv = s->ops->connect(s, raddr, size, flags);
> +       rv = kernel_connect(s, raddr, size, flags);
> ```
>
> is no more invasive than your proposed patch, and gives a more robust outcome.
>
> Please take a stab.
>
> If it proves at all non-trivial, e.g., in the conversion of arguments
> between kernel_sendmsg and sock_sendmsg/sock->ops->sendmsg, then let's
> submit your original patch. And I will do the conversion in net-next
> instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ