public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: sebastien.dugue@bull.net
Cc: Zach Brown <zach.brown@oracle.com>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	Benjamin LaHaise <bcrl@kvack.org>,
	Ulrich Drepper <drepper@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: + make-good_sigevent-non-static.patch added to -mm tree
Date: Thu, 25 Jan 2007 18:43:24 +0300	[thread overview]
Message-ID: <20070125154324.GA183@tv-sign.ru> (raw)

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.

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

Oleg.


             reply	other threads:[~2007-01-25 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 15:43 Oleg Nesterov [this message]
2007-01-26  9:32 ` + make-good_sigevent-non-static.patch added to -mm tree Sébastien Dugué
2007-01-26 10:08   ` Oleg Nesterov
2007-01-26 10:39     ` Sébastien Dugué

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=20070125154324.GA183@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=bcrl@kvack.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sebastien.dugue@bull.net \
    --cc=suparna@in.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=zach.brown@oracle.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox