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: <aBEwyNwBuihjvQ4g@LQ3V64L9R2>
Date: Tue, 29 Apr 2025 13:04:24 -0700
From: Joe Damato <jdamato@...tly.com>
To: Max Kellermann <max.kellermann@...os.com>
Cc: linux-fsdevel@...r.kernel.org, Christian Brauner <brauner@...nel.org>,
	Mike Pagano <mpagano@...too.org>,
	Carlos Llamas <cmllamas@...gle.com>,
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH vfs.fixes] eventpoll: Prevent hang in epoll_wait

On Tue, Apr 29, 2025 at 09:28:50PM +0200, Max Kellermann wrote:
> On Tue, Apr 29, 2025 at 9:22 PM Joe Damato <jdamato@...tly.com> wrote:
> > In commit 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in the
> > future"), a bug was introduced causing the loop in ep_poll to hang under
> > certain circumstances.
> >
> > When the timeout is non-NULL and ep_schedule_timeout returns false, the
> > flag timed_out was not set to true. This causes a hang.
> >
> > Adjust the logic and set timed_out, if needed, fixing the original code.
> 
> Hi Joe,
> 
> we have been working on the fix at the same time, this is my fix:
> 
>  https://lore.kernel.org/linux-fsdevel/20250429185827.3564438-1-max.kellermann@ionos.com/T/#u
> 
> I think mine is better because it checks "eavail" before setting
> "timed_out", preserving the old behavior (before commit 0a65bc27bd64).
> Your version may set "timed_out" and thus does an unnecessary
> list_empty() call in the following block. (And maybe it can reset
> "evail" to false?)

I think it's up to the maintainers to decide which patch is
preferred; I don't really have a preference.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ