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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Sep 2023 10:02:47 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jordan Rife <jrife@...gle.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()

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