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] [day] [month] [year] [list]
Message-ID: <20250823101824.GA21040@1wt.eu>
Date: Sat, 23 Aug 2025 12:18:24 +0200
From: Willy Tarreau <w@....eu>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Thomas Weißschuh <linux@...ssschuh.net>,
        "Paul E. McKenney" <paulmck@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tools/nolibc: avoid error in dup2() if old fd equals
 new fd

On Wed, Aug 20, 2025 at 10:29:27AM +0200, Thomas Weißschuh wrote:
> dup2() allows both 'old' and 'new' to have the same value, which dup3()
> does not. If libc dup2() is implemented through the dup3() system call,
> then it would incorrectly fail in this case.
> 
> Avoid the error by handling old == new explicitly.
> 
> Fixes: 30ca20517ac1 ("tools headers: Move the nolibc header from rcutorture to tools/include/nolibc/")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>

Good, LGTM!

Acked-by: Willy Tarreau <w@....eu>

Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ