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: <20250115-andocken-frequentieren-1ad1ec5bb42b@brauner>
Date: Wed, 15 Jan 2025 11:54:02 +0100
From: Christian Brauner <brauner@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Mickaël Salaün <mic@...ikod.net>, 
	Günther Noack <gnoack3000@...il.com>, Günther Noack <gnoack@...gle.com>, 
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-security-module@...r.kernel.org, Paul Moore <paul@...l-moore.com>, 
	Dave Chinner <david@...morbit.com>, Kent Overstreet <kent.overstreet@...ux.dev>, 
	syzbot+34b68f850391452207df@...kaller.appspotmail.com, syzbot+360866a59e3c80510a62@...kaller.appspotmail.com, 
	Ubisectech Sirius <bugreport@...sectech.com>, Brian Foster <bfoster@...hat.com>, 
	linux-bcachefs@...r.kernel.org, linux-xfs@...r.kernel.org
Subject: Re: [PATCH v1 1/2] landlock: Handle weird files

On Tue, Jan 14, 2025 at 11:15:42PM -0800, Christoph Hellwig wrote:
> On Sat, Jan 11, 2025 at 04:38:56PM +0100, Mickaël Salaün wrote:
> > I guess it depends on the filesystem implementation.  For instance, XFS
> > returns an error if a weird file is detected [1], whereas bcachefs
> > ignores it (which is considered a bug, but not fixed yet) [2].
> 
> If a filesyste, returns an invalid mode that's a file system bug and
> needs to be fixed there.  Warning in a consumer is perfectly fine.
> But the right action in that case is indeed not to grant the access.

Fyi, anonymous inodes traditionally set the mode to 0 which is
really annoying:

lrwx------ 1 root root  64 15. Jan 11:52 94 -> anon_inode:bpf-prog

> sudo stat -L /proc/1/fd/94
  File: /proc/1/fd/94
  Size: 0               Blocks: 0          IO Block: 4096   weird file
Device: 0,15    Inode: 4120        Links: 1
Access: (0600/?rw-------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-11-05 17:15:54.404000000 +0100
Modify: 2024-11-05 17:15:54.404000000 +0100
Change: 2024-11-05 17:15:54.404000000 +0100
 Birth: -


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ