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]
Date: Thu, 20 Jun 2024 13:04:22 +0300
From: Amir Goldstein <amir73il@...il.com>
To: Jan Kara <jack@...e.cz>
Cc: Christian Brauner <brauner@...nel.org>, NeilBrown <neilb@...e.de>, James Clark <james.clark@....com>, 
	ltp@...ts.linux.it, linux-nfs@...r.kernel.org, 
	LKML <linux-kernel@...r.kernel.org>, linux-fsdevel@...r.kernel.org, 
	Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v2] VFS: generate FS_CREATE before FS_OPEN when
 ->atomic_open used.

On Thu, Jun 20, 2024 at 12:41 PM Jan Kara <jack@...e.cz> wrote:
>
> On Tue 18-06-24 16:19:37, Christian Brauner wrote:
> > > AFAICT this will have a side-effect that now fsnotify_open() will be
> > > generated even for O_PATH open. It is true that fsnotify_close() is getting
> >
> > Thanks! That change seemed sensible because a close() event is
> > generated.
> >
> > But I don't agree that generating events for O_PATH fds doesn't make
> > sense on principle. But I don't care if you drop events for O_PATH now.
>
> Well, I can be convinced otherwise but I was not able to find a compeling
> usecase for it. fanotify(8) users primarily care about file data
> modification / access events and secondarily also about directory content
> changes (because they change how data can be accessed). And creation of
> O_PATH fds does not seem to fall into either of these categories...

Not to mention the fact that security_file_open() and therefore
fsnotify_open_perm() is not called for O_PATH open.

It's not that we have to keep FS_OPEN balanced with
FS_OPEN_PERM, but I think it will be quite odd to get FS_OPEN without
FS_OPEN_PERM.

I think that open an O_PATH fd fits perfectly to the design "pre path"
events [1].
I have designated FAN_PATH_ACCESS (with dir id + name info) for lookup
permission.
Perhaps open an O_PATH can generate the same event with additional child id
or another dedicated FAN_PATH_OPEN event.

Thanks,
Amir.

[1] https://github.com/amir73il/man-pages/commits/fan_pre_path/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ