Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 30 Aug 2019 08:30:00 -0700 | 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@armlinux.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
| |