Follow @Openwall on Twitter for new release announcements and other news
[<prev] [<thread-prev] [day] [month] [year] [list]
Message-ID: <axKm0wq2rtXyfOKL@cloudsdale.lanodan.eu>
Date: Fri, 4 Dec 2026 12:41:07 +0100
From: "Haelwenn (lanodan) Monnier" <contact@...ktivis.me>
To: musl@...ts.openwall.com
Subject: Re: nftw takes a leak

[2026-12-03 21:53:24+0100] Jerome Hamm:
>Hi,
>
>I think I found a file descriptor leak in nftw (see poc below). Bug found
>and code (and stupid joke) written 100% by wetware.
>
>musl-gcc nftw-leak.c -o nftw-leak
>./nftw-leak
>
>Cheers,
>Jérôme.

Fun one, making the callback return 0 instead of 1 avoids the leak,
which in a way makes sense as that's an errorneous situation with nftw()
returning the return value of the callback function.

Also made me notice that making the callback function return -1
doesn't ends up with errno==EACCES as put in POSIX.

Cheers

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.