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: <CAGudoHGfa28YwprFpTOd6JnuQ7KAP=j36et=u5VrEhTek0HFtQ@mail.gmail.com>
Date: Thu, 12 Jun 2025 23:35:09 +0200
From: Mateusz Guzik <mjguzik@...il.com>
To: Luis Henriques <luis@...lia.com>
Cc: Jan Kara <jack@...e.cz>, Alexander Viro <viro@...iv.linux.org.uk>, 
	Christian Brauner <brauner@...nel.org>, linux-fsdevel@...r.kernel.org, 
	linux-kernel@...r.kernel.org, kernel-dev@...lia.com
Subject: Re: [PATCH] fs: drop assert in file_seek_cur_needs_f_lock

On Thu, Jun 12, 2025 at 8:07 PM Luis Henriques <luis@...lia.com> wrote:
> > I guess the commit message could be improved. Something like:
> >
> > The assert in function file_seek_cur_needs_f_lock() can be triggered very
> > easily because there are many users of vfs_llseek() (such as overlayfs)
> > that do their custom locking around llseek instead of relying on
> > fdget_pos(). Just drop the overzealous assertion.
>
> Thanks, makes more sense.
>
> Christian, do you prefer me to resend the patch or is it easier for you to
> just amend the commit?  (Though, to be fair, the authorship could also be
> changed as I mostly reported the issue and tested!)
>

How about leaving a trace in the code.

For example a comment of this sort in place of the assert:
Note that we are not guaranteed to be called after fdget_pos() on this
file obj, in which case the caller is expected to provide the
appropriate locking.

I find it fishy af that a rando fs is playing games with the file obj
*and* the fact that games are played is not assertable, but at least
people can be warned.
-- 
Mateusz Guzik <mjguzik gmail.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ