lkml.org 
[lkml]   [2007]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + make-good_sigevent-non-static.patch added to -mm tree
On Thu, 25 Jan 2007 18:43:24 +0300 Oleg Nesterov <oleg@tv-sign.ru> wrote:

> SИbastien DuguИ wrote:
> >
> > +struct task_struct *good_sigevent(sigevent_t *event)
> > +{
> > + struct task_struct *task = current->group_leader;
> > +
> > + if ((event->sigev_notify & SIGEV_THREAD_ID) == SIGEV_THREAD_ID) {
> > + task = find_task_by_pid(event->sigev_notify_thread_id);
> > +
> > + if (!task || task->tgid != current->tgid)
> > + return NULL;
> > + } else if (event->sigev_notify == SIGEV_SIGNAL) {
>
> No, no, we can't use "else" here,
>
> > + if (event->sigev_signo <= 0 || event->sigev_signo > SIGRTMAX)
>
> because we skip the check above in SIGEV_THREAD_ID case.

Right, will fix this.

>
> This way any user can crash the kernel with a minimal effort.

Well I tried, no crash, just the signal failing to be delivered.

Thanks,

Sébastien.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-26 10:35    [W:0.079 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site