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-next>] [day] [month] [year] [list]
Message-ID: <20111223131139.GA26157@tiehlicka.suse.cz>
Date:	Fri, 23 Dec 2011 14:11:39 +0100
From:	Michal Hocko <mhocko@...e.cz>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Anders Johansson <ajohansson@...ell.com>,
	David Miller <davem@...emloft.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Neil Horman <nhorman@...driver.com>,
	Oleg Nesterov <oleg@...hat.com>
Subject: possible ERESTARTNOHAND leak into userspace

Hi,
this has already been discussed few years back with reports that select
returned with ERESTARTNOHAND in multi-threaded applications
(http://forum.soft32.com/linux/PATCH-select-fix-sys_select-leak-ERESTARTNOHAND-userspace-ftopict338572.html)

Dave has come up with a possible explanation of the race but there was
no further follow up with a conclusion.

Just for reference:
        Thread_A				Thread_B
	CPU0					CPU1
						syscall_XYZ
core_sys_select				
  ret = -ERESTARTNOHAND;
  if (signal_pending(current))
     					do_notify_resume
     					  do_signal (clear signal pending)
  return ret;
return from syscall
no pending signal
return ERESTARTNOHAND

The race window is rather small and hard to trigger but we have seen
reports where people really saw select returning ERESTARTNOHAND (on
2.6.16 based kernel - x86_64).
I am not able to reproduce that myself neither with .16 kernel nor with
the current vanilla so I am not sure whether the problem has been fixed
already. But I do not see what prevents the race with vanilla.

Is the issue real and fixable?

Thanks
-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
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