DCCP protocol discussions
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: dccp@vger.kernel.org
Subject: Re: [PATCH 03/24] net: add a new sockptr_t type
Date: Mon, 20 Jul 2020 17:43:22 +0000	[thread overview]
Message-ID: <20200720174322.GA21785@lst.de> (raw)
In-Reply-To: <20200720124737.118617-4-hch@lst.de>

On Mon, Jul 20, 2020 at 09:37:48AM -0700, Eric Biggers wrote:
> How does this not introduce a massive security hole when
> CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE?
> 
> AFAICS, userspace can pass in a pointer >= TASK_SIZE,
> and this code makes it be treated as a kernel pointer.

Yeah, we'll need to validate that before initializing the pointer.

But thinking this a little further:  doesn't this mean any
set_fs(KERNEL_DS) that has other user pointers than the one it is
intended for has the same issue?  Pretty much all of these are gone
in mainline now, but in older stable kernels there might be some
interesting cases, especially in the compat ioctl handlers.

  parent reply	other threads:[~2020-07-20 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 12:47 [PATCH 03/24] net: add a new sockptr_t type Christoph Hellwig
2020-07-20 16:37 ` Eric Biggers
2020-07-20 17:43 ` Christoph Hellwig [this message]
2020-07-20 17:55 ` Eric Biggers
2020-07-21  9:55 ` David Laight
2020-07-21 10:14 ` David Laight
2020-07-22  7:56 ` Christoph Hellwig

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=20200720174322.GA21785@lst.de \
    --to=hch@lst.de \
    --cc=dccp@vger.kernel.org \
    /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