All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jann Horn <jannh@google.com>
Cc: Andrei Vagin <avagin@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] time/namespace: Forbid timens page faults under kthread_use_mm()
Date: Wed, 30 Nov 2022 01:09:36 +0100	[thread overview]
Message-ID: <87tu2hti9r.ffs@tglx> (raw)
In-Reply-To: <CAG48ez2AqgQJKXYdLXh-WaoMuKBgCUuVge_8RAghKBDhfkeJJw@mail.gmail.com>

On Tue, Nov 29 2022 at 23:34, Jann Horn wrote:
> On Tue, Nov 29, 2022 at 11:28 PM Jann Horn <jannh@google.com> wrote:
>> That said, I haven't actually tried it. But I don't think there's
>> anything in the page fault handling path that distinguishes between
>> copy_from_user() faults in kthread context and other userspace faults
>> in a relevant way?
>
> Ah, but I guess even if this can happen, it's not actually as bad as I
> thought, since kthreads are in init_time_ns, and init_time_ns doesn't
> have a ->vvar_page, so this isn't going to lead to anything terrible
> like page UAF, and it's just a garbage-in-garbage-out scenario.

True, but catching the kthread -> fault (vvar/vdso page) scenario
definitely has a value.

Thanks,

        tglx

  reply	other threads:[~2022-11-30  0:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 19:18 [PATCH 1/2] time/namespace: Refactor copy-pasted helper into one copy Jann Horn
2022-11-29 19:18 ` [PATCH 2/2] time/namespace: Forbid timens page faults under kthread_use_mm() Jann Horn
2022-11-29 21:18   ` Thomas Gleixner
2022-11-29 22:28     ` Jann Horn
2022-11-29 22:34       ` Jann Horn
2022-11-30  0:09         ` Thomas Gleixner [this message]
2022-11-30  0:07       ` Thomas Gleixner
2022-11-30 22:48         ` David Laight
2022-12-01  9:31           ` Jann Horn
2022-11-30 10:15 ` [PATCH 1/2] time/namespace: Refactor copy-pasted helper into one copy Jann Horn
2022-11-30 10:57   ` Thomas Gleixner

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=87tu2hti9r.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=avagin@gmail.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.