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: <4D151FCC.4060202@pobox.com>
Date:	Fri, 24 Dec 2010 17:33:48 -0500
From:	Jeff Garzik <jgarzik@...ox.com>
To:	Jesper Juhl <jj@...osbits.net>
CC:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] gen_init_cpio: Avoid race between call to stat() and
 call to open()

On 12/24/2010 03:28 PM, Jesper Juhl wrote:
> Hi,
>
> In usr/gen_init_cpio.c::cpio_mkfile() a call to stat() is made based on
> pathname, subsequently the file is open()'ed and then the value of the
> initial stat() call is used to allocate a buffer. This is not safe since
> the file may change between the call to stat() and the call to open().
> Safer to just open() the file and then do fstat() using the filedescriptor
> returned by open.
>
>
> Signed-off-by: Jesper Juhl<jj@...osbits.net>

Acked-by: Jeff Garzik <jgarzik@...hat.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