<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/namei.c, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-08-17T13:16:06Z</updated>
<entry>
<title>__follow_mount_rcu(): verify that mount_lock remains unchanged</title>
<updated>2022-08-17T13:16:06Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-07-04T21:26:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fc0b164bbc3c772152b67038464a6324fb688ce'/>
<id>urn:sha1:6fc0b164bbc3c772152b67038464a6324fb688ce</id>
<content type='text'>
commit 20aac6c60981f5bfacd66661d090d907bf1482f0 upstream.

Validate mount_lock seqcount as soon as we cross into mount in RCU
mode.  Sure, -&gt;mnt_root is pinned and will remain so until we
do rcu_read_unlock() anyway, and we will eventually fail to unlazy if
the mount_lock had been touched, but we might run into a hard error
(e.g. -ENOENT) before trying to unlazy.  And it's possible to end
up with RCU pathwalk racing with rename() and umount() in a way
that would fail with -ENOENT while non-RCU pathwalk would've
succeeded with any timings.

Once upon a time we hadn't needed that, but analysis had been subtle,
brittle and went out of window as soon as RENAME_EXCHANGE had been
added.

It's narrow, hard to hit and won't get you anything other than
stray -ENOENT that could be arranged in much easier way with the
same priveleges, but it's a bug all the same.

Cc: stable@kernel.org
X-sky-is-falling: unlikely
Fixes: da1ce0670c14 "vfs: add cross-rename"
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fs: Add missing umask strip in vfs_tmpfile</title>
<updated>2022-08-17T13:13:47Z</updated>
<author>
<name>Yang Xu</name>
</author>
<published>2022-07-14T06:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d082cb154f288294a7acb80277948c6e8e7942e3'/>
<id>urn:sha1:d082cb154f288294a7acb80277948c6e8e7942e3</id>
<content type='text'>
commit ac6800e279a22b28f4fc21439843025a0d5bf03e upstream.

All creation paths except for O_TMPFILE handle umask in the vfs directly
if the filesystem doesn't support or enable POSIX ACLs. If the filesystem
does then umask handling is deferred until posix_acl_create().
Because, O_TMPFILE misses umask handling in the vfs it will not honor
umask settings. Fix this by adding the missing umask handling.

Link: https://lore.kernel.org/r/1657779088-2242-2-git-send-email-xuyang2018.jy@fujitsu.com
Fixes: 60545d0d4610 ("[O_TMPFILE] it's still short a few helpers, but infrastructure should be OK now...")
Cc: &lt;stable@vger.kernel.org&gt; # 4.19+
Reported-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Reviewed-and-Tested-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Acked-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
Signed-off-by: Yang Xu &lt;xuyang2018.jy@fujitsu.com&gt;
Signed-off-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pull-18-rc1-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2022-06-05T02:07:15Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-06-05T02:07:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=952923ddc01120190dcf671e7b354364ce1d1362'/>
<id>urn:sha1:952923ddc01120190dcf671e7b354364ce1d1362</id>
<content type='text'>
Pull vfs pathname updates from Al Viro:
 "Several cleanups in fs/namei.c"

* tag 'pull-18-rc1-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  namei: cleanup double word in comment
  get rid of dead code in legitimize_root()
  fs/namei.c:reserve_stack(): tidy up the call of try_to_unlazy()
</content>
</entry>
<entry>
<title>Merge tag 'ovl-update-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs</title>
<updated>2022-05-30T18:19:16Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-05-30T18:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c5ca23f7414eb2c782f945aa417cfab7b5c88dd'/>
<id>urn:sha1:2c5ca23f7414eb2c782f945aa417cfab7b5c88dd</id>
<content type='text'>
Pull overlayfs updates from Miklos Szeredi:

 - Support idmapped layers in overlayfs (Christian Brauner)

 - Add a fix to exportfs that is relevant to open_by_handle_at(2) as
   well

 - Introduce new lookup helpers that allow passing mnt_userns into
   inode_permission()

* tag 'ovl-update-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
  ovl: support idmapped layers
  ovl: handle idmappings in ovl_xattr_{g,s}et()
  ovl: handle idmappings in layer open helpers
  ovl: handle idmappings in ovl_permission()
  ovl: use ovl_copy_{real,upper}attr() wrappers
  ovl: store lower path in ovl_inode
  ovl: handle idmappings for layer lookup
  ovl: handle idmappings for layer fileattrs
  ovl: use ovl_path_getxattr() wrapper
  ovl: use ovl_lookup_upper() wrapper
  ovl: use ovl_do_notify_change() wrapper
  ovl: pass layer mnt to ovl_open_realfile()
  ovl: pass ofs to setattr operations
  ovl: handle idmappings in creation operations
  ovl: add ovl_upper_mnt_userns() wrapper
  ovl: pass ofs to creation operations
  ovl: use wrappers to all vfs_*xattr() calls
  exportfs: support idmapped mounts
  fs: add two trivial lookup helpers
</content>
</entry>
<entry>
<title>Merge tag 'mm-nonmm-stable-2022-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2022-05-27T18:22:03Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-05-27T18:22:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f664045c8688c40ad0591abd6ab89db9ecd7945'/>
<id>urn:sha1:6f664045c8688c40ad0591abd6ab89db9ecd7945</id>
<content type='text'>
Pull misc updates from Andrew Morton:
 "The non-MM patch queue for this merge window.

  Not a lot of material this cycle. Many singleton patches against
  various subsystems. Most notably some maintenance work in ocfs2
  and initramfs"

* tag 'mm-nonmm-stable-2022-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (65 commits)
  kcov: update pos before writing pc in trace function
  ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
  ocfs2: dlmfs: don't clear USER_LOCK_ATTACHED when destroying lock
  fs/ntfs: remove redundant variable idx
  fat: remove time truncations in vfat_create/vfat_mkdir
  fat: report creation time in statx
  fat: ignore ctime updates, and keep ctime identical to mtime in memory
  fat: split fat_truncate_time() into separate functions
  MAINTAINERS: add Muchun as a memcg reviewer
  proc/sysctl: make protected_* world readable
  ia64: mca: drop redundant spinlock initialization
  tty: fix deadlock caused by calling printk() under tty_port-&gt;lock
  relay: remove redundant assignment to pointer buf
  fs/ntfs3: validate BOOT sectors_per_clusters
  lib/string_helpers: fix not adding strarray to device's resource list
  kernel/crash_core.c: remove redundant check of ck_cmdline
  ELF, uapi: fixup ELF_ST_TYPE definition
  ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
  ipc: update semtimedop() to use hrtimer
  ipc/sem: remove redundant assignments
  ...
</content>
</entry>
<entry>
<title>namei: cleanup double word in comment</title>
<updated>2022-05-20T03:26:29Z</updated>
<author>
<name>Tom Rix</name>
</author>
<published>2022-01-25T13:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30476f7e6dbcb075850c6e33b15460dd4868c985'/>
<id>urn:sha1:30476f7e6dbcb075850c6e33b15460dd4868c985</id>
<content type='text'>
Remove the second 'to'.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>get rid of dead code in legitimize_root()</title>
<updated>2022-05-20T03:26:29Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-01-07T17:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52dba645ca3a2e8695f14fefb608a3b82a7c8a4e'/>
<id>urn:sha1:52dba645ca3a2e8695f14fefb608a3b82a7c8a4e</id>
<content type='text'>
Combination of LOOKUP_IS_SCOPED and NULL nd-&gt;root.mnt is impossible
after successful path_init().  All places where -&gt;root.mnt might
become NULL do that only if LOOKUP_IS_SCOPED is not there and
path_init() itself can return success without setting nd-&gt;root
only if ND_ROOT_PRESET had been set (in which case nd-&gt;root
had been set by caller and never changed) or if the name had
been a relative one *and* none of the bits in LOOKUP_IS_SCOPED
had been present.

Since all calls of legitimize_root() must be downstream of successful
path_init(), the check for !nd-&gt;root.mnt &amp;&amp; (nd-&gt;flags &amp; LOOKUP_IS_SCOPED)
is pure paranoia.

FWIW, it had been discussed (and agreed upon) with Aleksa back when
scoped lookups had been merged; looks like that had fallen through the
cracks back then.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs/namei.c:reserve_stack(): tidy up the call of try_to_unlazy()</title>
<updated>2022-05-20T03:26:29Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2022-01-07T17:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5ca024e165d952b12da5ea86c36ea70d70bfc98'/>
<id>urn:sha1:e5ca024e165d952b12da5ea86c36ea70d70bfc98</id>
<content type='text'>
!foo() != 0 is a strange way to spell !foo(); fallout from
"fs: make unlazy_walk() error handling consistent"...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>proc/sysctl: make protected_* world readable</title>
<updated>2022-05-13T23:58:15Z</updated>
<author>
<name>Julius Hemanth Pitti</name>
</author>
<published>2022-05-13T23:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7031c144043c5b9a9b8827aaf44a67937559418'/>
<id>urn:sha1:c7031c144043c5b9a9b8827aaf44a67937559418</id>
<content type='text'>
protected_* files have 600 permissions which prevents non-superuser from
reading them.

Container like "AWS greengrass" refuse to launch unless
protected_hardlinks and protected_symlinks are set.  When containers like
these run with "userns-remap" or "--user" mapping container's root to
non-superuser on host, they fail to run due to denied read access to these
files.

As these protections are hardly a secret, and do not possess any security
risk, making them world readable.

Though above greengrass usecase needs read access to only
protected_hardlinks and protected_symlinks files, setting all other
protected_* files to 644 to keep consistency.

Link: http://lkml.kernel.org/r/20200709235115.56954-1-jpitti@cisco.com
Fixes: 800179c9b8a1 ("fs: add link restrictions")
Signed-off-by: Julius Hemanth Pitti &lt;jpitti@cisco.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Cc: Iurii Zaikin &lt;yzaikin@google.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>namei: Call aops write_begin() and write_end() directly</title>
<updated>2022-05-08T18:28:45Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
</author>
<published>2022-03-03T18:35:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27a77913448fe976f7c1d5e4b5467a5fa1b2a195'/>
<id>urn:sha1:27a77913448fe976f7c1d5e4b5467a5fa1b2a195</id>
<content type='text'>
pagecache_write_begin() and pagecache_write_end() are now trivial
wrappers, so call the aops directly.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
