Thread (10 messages) flat view 10 messages, 4 authors, 2013-02-21

Re: [PATCH 3/3] posix timers: Add syscall that works on timer sigevent

From: Pavel Emelyanov <hidden>
Date: 2013-02-17 18:54:32
Also in: lkml

On 02/17/2013 05:42 PM, Jann Horn wrote:
On Thu, Feb 14, 2013 at 08:19:45PM +0400, Pavel Emelyanov wrote:
quoted
+	struct sigevent event;
[...]
quoted
+	event.sigev_notify = timer->it_sigev_notify;
+	event.sigev_signo = timer->sigq->info.si_signo;
+	event.sigev_value = timer->sigq->info.si_value;
+	event.sigev_notify_thread_id = pid_vnr(timer->it_pid);
[...]
quoted
+	if (old_event && copy_to_user(old_event, &event, sizeof(event)))
Won't this leak uninitialized kernel stack data to userspace? As far as I can
see, the _sigev_un union is bigger than the _tid field in it, so the rest of
it will be copied over without initialization, right?
Indeed :( Thanks for catching this, I will memezro the thing before copying
to the user-space.
Jann
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help