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]
Date:	Thu, 22 Feb 2007 10:10:51 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Aristeu Sergio Rozanski Filho <aristeu.sergio@...il.com>
CC:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tty_io: fix race in master pty close/slave pty close
 path

Aristeu Sergio Rozanski Filho wrote:
> 
> This normally would only issue a warning on idr_remove() but in case of a
> customer's critical application, it's never too simple:
> 
> thread1: opens master, gets index X
> thread1: begin closing master
> thread2: begin opening slave with index X
> thread1: finishes closing master, index X released
> thread3: opens master, gets index X, just released
> thread2: fails opening slave, releases index X         <----
> thread4: opens master, gets index X, init_dev() then find an already in use
> 	 and healthy tty and fails
> 

OK, that's fiendishly subtle, as most races are, of course.  I'll try to 
walk through the codepaths to make sure the proposed patch doesn't 
introduce a leak, but the concept sounds good.

	-hpa
-
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