[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whuggNup=-MOS=7gBkuRqUigk7ABot_Pxi5koF=dM3S5Q@mail.gmail.com>
Date: Fri, 30 Aug 2019 08:30:00 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc: Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Chris Metcalf <cmetcalf@...hip.com>,
Christoph Lameter <cl@...ux.com>,
Kirill Tkhai <tkhai@...dex.ru>, Mike Galbraith <efault@....de>,
Thomas Gleixner <tglx@...utronix.de>,
Vladimir Davydov <vdavydov@...allels.com>,
Kirill Tkhai <ktkhai@...allels.com>,
Ingo Molnar <mingo@...nel.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] Use of probe_kernel_address() in task_rcu_dereference()
without checking return value
On Fri, Aug 30, 2019 at 7:08 AM Russell King - ARM Linux admin
<linux@...linux.org.uk> wrote:
>
> which means that when probe_kernel_address() returns -EFAULT, the
> destination is left uninitialised. In the case of
> task_rcu_dereference(), this means that "siginfo" can be used without
> having been initialised, resulting in this function returning an
> indeterminant result (based on the value of an uninitialised variable
> on the stack.)
Do you actually see that behavior?
Because the foillowing lines:
smp_rmb();
if (unlikely(task != READ_ONCE(*ptask)))
goto retry;
are what is supposed to protect it - yes, it could have faulted, but
only if 'task' isn't valid any more, and we just re-checked it.
Linus
Powered by blists - more mailing lists