mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Mathias Krause <minipli@googlemail.com>,
	linux-kernel@vger.kernel.org,
	Brad Spengler <spender@grsecurity.net>,
	PaX Team <pageexec@freemail.hu>
Subject: Re: [PATCH] posix-timers: fix stack info leak in timer_create()
Date: Sun, 5 Oct 2014 23:24:47 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1410052314380.4383@nanos> (raw)
In-Reply-To: <20141005210614.GA28899@redhat.com>

On Sun, 5 Oct 2014, Oleg Nesterov wrote:
> In any case this all looks confusing to me. sys_timer_create() does
> 
> 	new_timer->sigq->info.si_value = event.sigev_value;
> 	new_timer->sigq->info.si_tid   = new_timer->it_id;
> 
> later, this writes to the differents members (_rt and _timer) in the
> same union. But the comment in struct siginfo says that we should use
> _timer. And copy_siginfo_to_user() reports si_tid and si_ptr, this
> again reads _timer and _rt. This should actually work, _sigval should
> have the same offset in both struct's, still it looks confusing imho.

It does.

> Perhaps we should change
> 
> 	#define si_value	_sifields._rt._sigval
> 	#define si_int		_sifields._rt._sigval.sival_int
> 	#define si_ptr		_sifields._rt._sigval.sival_ptr
> 
> to use _timer instead. Nevermind, this is off-topic.

Well that would cause mqueue, perf and procfs to read/set the timer
fields. Odd as well.

Thanks,

	tglx

  reply	other threads:[~2014-10-05 21:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-04 21:06 Mathias Krause
2014-10-05 21:06 ` Oleg Nesterov
2014-10-05 21:24   ` Thomas Gleixner [this message]
2014-10-05 21:54   ` Mathias Krause
2014-10-05 22:28     ` Oleg Nesterov
2014-10-25  8:45 ` [tip:timers/urgent] posix-timers: Fix " tip-bot for Mathias Krause

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=alpine.DEB.2.11.1410052314380.4383@nanos \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minipli@googlemail.com \
    --cc=oleg@redhat.com \
    --cc=pageexec@freemail.hu \
    --cc=spender@grsecurity.net \
    /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

all inboxes | Powered by JetHome®