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:	Wed, 26 May 2010 11:16:51 -0400
From:	Nick Bowler <nbowler@...iptictech.com>
To:	Sébastien Paumier 
	<sebastien.paumier@...v-mlv.fr>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: PROBLEM: getpid() returning same value as getppid()

On 16:45 Wed 26 May     , Sébastien Paumier wrote:
> Hi,
> here is a bug that occurs on my kernel 2.6.31-21, maybe with older ones. 
>   If a C program contains a function with the constructor attribute that 
> calls getpid(), then, a call to syscall(SYS_fork) produces a son that 
> obtains the same value calling getpid() or getppid().

The GNU C library caches the results of getpid, which is probably the
cause of your grief.  This cache relies on the glibc wrappers for fork
and friends, which you have bypassed by using syscall directly.

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
--
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