lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1302051155000.11905@ionos>
Date:	Tue, 5 Feb 2013 11:55:19 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Stanislaw Gruszka <sgruszka@...hat.com>
cc:	Oleg Nesterov <oleg@...hat.com>,
	Tommi Rantala <tt.rantala@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Dave Jones <davej@...hat.com>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: clock_nanosleep() task_struct leak

On Tue, 5 Feb 2013, Stanislaw Gruszka wrote:
> On Mon, Feb 04, 2013 at 08:32:23PM +0100, Oleg Nesterov wrote:
> > On 02/01, Thomas Gleixner wrote:
> > >
> > > B1;2601;0cOn Fri, 1 Feb 2013, Tommi Rantala wrote:
> > >
> > > > Hello,
> > > >
> > > > Trinity discovered a task_struct leak with clock_nanosleep(), reproducible with:
> > > >
> > > > -----8<-----8<-----8<-----
> > > > #include <time.h>
> > > >
> > > > static const struct timespec req;
> > > >
> > > > int main(void) {
> > > >         return clock_nanosleep(CLOCK_PROCESS_CPUTIME_ID,
> > > >                         TIMER_ABSTIME, &req, NULL);
> > > > }
> > > > -----8<-----8<-----8<-----
> > 
> > posix_cpu_timer_create()->get_task_struct() I guess...
> > 
> > Cough. I am not sure I ever understood this code, but now it certainly
> > looks as if I never saw it before.
> 
> Looks on do_cpu_nanosleep() we call posix_cpu_timer_create(), but we do
> not call posix_cpu_timer_del() at the end. Fix will not be super simple,
> since we need to care about error cases. I can cook a patch if nobody
> else want to do this.

Would be much appreciated!

Thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ