<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/ecryptfs, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Merge tag 'ecryptfs-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs</title>
<updated>2026-08-21T19:32:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-21T19:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=af33c5a2a9fd52f07ffb428255b7f060da1de49d'/>
<id>af33c5a2a9fd52f07ffb428255b7f060da1de49d</id>
<content type='text'>
Pull eCryptfs updates from Tyler Hicks:

 - Hardening and fixes for maliciously crafted eCryptfs metadata in the
   lower encrypted file

 - Hardening and fixes for maliciously crafted userspace &lt;-&gt; kernel
   miscdev communications

 - Locking fixes for userspace &lt;-&gt; kernel miscdev communications

 - Fix to display encrypted filename related mount options

 - Clean up address_space_operations and reduce build dependencies by
   moving to filemap_dirty_folio()

 - Get rid of an unnecessary memory allocation in the inode update path

 - Kernel-doc formatting corrections

* tag 'ecryptfs-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  ecryptfs: ecryptfs_kernel.h: clean up kernel-doc comments
  ecryptfs: use filemap_dirty_folio for address space operations
  ecryptfs: avoid heap allocation for inode size write
  ecryptfs: show filename encryption options
  eCryptfs: bound the packet-length peek to the user buffer
  ecryptfs: reject too-small tag 70 packets
  ecryptfs: fix tag 11 packet exact-fit size check
  ecryptfs: pass packet set buffer size to parser
  ecryptfs: hold msg ctx list lock when cleaning daemon queue
  ecryptfs: release message context on send failure
  ecryptfs: reject oversized encrypted_key_size in parse_tag_3_packet
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull eCryptfs updates from Tyler Hicks:

 - Hardening and fixes for maliciously crafted eCryptfs metadata in the
   lower encrypted file

 - Hardening and fixes for maliciously crafted userspace &lt;-&gt; kernel
   miscdev communications

 - Locking fixes for userspace &lt;-&gt; kernel miscdev communications

 - Fix to display encrypted filename related mount options

 - Clean up address_space_operations and reduce build dependencies by
   moving to filemap_dirty_folio()

 - Get rid of an unnecessary memory allocation in the inode update path

 - Kernel-doc formatting corrections

* tag 'ecryptfs-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  ecryptfs: ecryptfs_kernel.h: clean up kernel-doc comments
  ecryptfs: use filemap_dirty_folio for address space operations
  ecryptfs: avoid heap allocation for inode size write
  ecryptfs: show filename encryption options
  eCryptfs: bound the packet-length peek to the user buffer
  ecryptfs: reject too-small tag 70 packets
  ecryptfs: fix tag 11 packet exact-fit size check
  ecryptfs: pass packet set buffer size to parser
  ecryptfs: hold msg ctx list lock when cleaning daemon queue
  ecryptfs: release message context on send failure
  ecryptfs: reject oversized encrypted_key_size in parse_tag_3_packet
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove excl arg to -&gt;create inode_operation</title>
<updated>2026-07-31T08:18:30+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neil@brown.name</email>
</author>
<published>2026-07-01T11:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b2f1e6301efa4a80becdb0715416c3cbc693fbb4'/>
<id>b2f1e6301efa4a80becdb0715416c3cbc693fbb4</id>
<content type='text'>
The only time that 'false' is passed as the 'excl' arg to the -&gt;create
inode_operation is in lookup_open() when -&gt;atomic_open is not provided
by the parent directory.
*all* directory inode_operations which do not have -&gt;atomic_open
completely ignore the 'excl' arg.

Therefore we don't need the 'excl' arg.  Those few -&gt;create operations
which pay attention to the arg are only ever called with a value of
'true'.

We remove that arg and change all -&gt;create operations to behave as those
thhe arg were 'true'.

Signed-off-by: NeilBrown &lt;neil@brown.name&gt;
Link: https://patch.msgid.link/178290671516.27465.15984496764174914338@noble.neil.brown.name
Reviewed-by: Jori Koolstra &lt;jkoolstra@xs4all.nl&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only time that 'false' is passed as the 'excl' arg to the -&gt;create
inode_operation is in lookup_open() when -&gt;atomic_open is not provided
by the parent directory.
*all* directory inode_operations which do not have -&gt;atomic_open
completely ignore the 'excl' arg.

Therefore we don't need the 'excl' arg.  Those few -&gt;create operations
which pay attention to the arg are only ever called with a value of
'true'.

We remove that arg and change all -&gt;create operations to behave as those
thhe arg were 'true'.

Signed-off-by: NeilBrown &lt;neil@brown.name&gt;
Link: https://patch.msgid.link/178290671516.27465.15984496764174914338@noble.neil.brown.name
Reviewed-by: Jori Koolstra &lt;jkoolstra@xs4all.nl&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: ecryptfs_kernel.h: clean up kernel-doc comments</title>
<updated>2026-07-23T00:59:33+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2026-07-22T00:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f81cb44f9a4b88d73ee5dec4a1ccdb0232fd2e3f'/>
<id>f81cb44f9a4b88d73ee5dec4a1ccdb0232fd2e3f</id>
<content type='text'>
- don't use "/**" for non-kernel-doc comments
- use the struct keyword when describing structs
- delete one Excess struct member

to prevent the following warnings:

Warning: ./fs/ecryptfs/ecryptfs_kernel.h:14 cannot understand function
 prototype: 'ECRYPTFS_KERNEL_H'
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:207 This comment starts with
 '/**', but isn't a kernel-doc comment.
 * This is the primary struct associated with each encrypted file.
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:275 cannot understand function
 prototype: 'struct ecryptfs_global_auth_tok'
Warning: fs/ecryptfs/ecryptfs_kernel.h:283 Excess struct member
 'global_auth_tok' description in 'ecryptfs_global_auth_tok'
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:298 cannot understand function
 prototype: 'struct ecryptfs_key_tfm'
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:309 This comment starts with
 '/**', but isn't a kernel-doc comment.
 * This struct is to enable a mount-wide passphrase/salt combo. This

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- don't use "/**" for non-kernel-doc comments
- use the struct keyword when describing structs
- delete one Excess struct member

to prevent the following warnings:

Warning: ./fs/ecryptfs/ecryptfs_kernel.h:14 cannot understand function
 prototype: 'ECRYPTFS_KERNEL_H'
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:207 This comment starts with
 '/**', but isn't a kernel-doc comment.
 * This is the primary struct associated with each encrypted file.
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:275 cannot understand function
 prototype: 'struct ecryptfs_global_auth_tok'
Warning: fs/ecryptfs/ecryptfs_kernel.h:283 Excess struct member
 'global_auth_tok' description in 'ecryptfs_global_auth_tok'
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:298 cannot understand function
 prototype: 'struct ecryptfs_key_tfm'
Warning: ./fs/ecryptfs/ecryptfs_kernel.h:309 This comment starts with
 '/**', but isn't a kernel-doc comment.
 * This struct is to enable a mount-wide passphrase/salt combo. This

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: use filemap_dirty_folio for address space operations</title>
<updated>2026-07-21T03:12:46+00:00</updated>
<author>
<name>Aditya Prakash Srivastava</name>
<email>aditya.ansh182@gmail.com</email>
</author>
<published>2026-07-03T09:00:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=21a6287ae2489426d23979e2213033dd204aa9fa'/>
<id>21a6287ae2489426d23979e2213033dd204aa9fa</id>
<content type='text'>
ecryptfs does not use buffer_heads. The legacy block_dirty_folio and
block_invalidate_folio mapping operations were only added as a
temporary compatibility fallback under CONFIG_BLOCK.

Since ecryptfs does not attach private metadata (such as buffer_heads)
to its folios, block_dirty_folio is unnecessary.

Modernize ecryptfs to use filemap_dirty_folio for its dirty_folio
address space operation. This allows removing the block_dirty_folio
and block_invalidate_folio fallbacks, removing the buffer_head header
include, and removing the CONFIG_BLOCK dependency inside ecryptfs_aops.

Signed-off-by: Aditya Prakash Srivastava &lt;aditya.ansh182@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ecryptfs does not use buffer_heads. The legacy block_dirty_folio and
block_invalidate_folio mapping operations were only added as a
temporary compatibility fallback under CONFIG_BLOCK.

Since ecryptfs does not attach private metadata (such as buffer_heads)
to its folios, block_dirty_folio is unnecessary.

Modernize ecryptfs to use filemap_dirty_folio for its dirty_folio
address space operation. This allows removing the block_dirty_folio
and block_invalidate_folio fallbacks, removing the buffer_head header
include, and removing the CONFIG_BLOCK dependency inside ecryptfs_aops.

Signed-off-by: Aditya Prakash Srivastava &lt;aditya.ansh182@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: avoid heap allocation for inode size write</title>
<updated>2026-07-21T03:12:46+00:00</updated>
<author>
<name>Yichong Chen</name>
<email>chenyichong@uniontech.com</email>
</author>
<published>2026-06-30T03:08:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8fafd7c86fc35bd11eb34d4ab2d6282b3354f30f'/>
<id>8fafd7c86fc35bd11eb34d4ab2d6282b3354f30f</id>
<content type='text'>
ecryptfs_write_inode_size_to_header() allocates an 8-byte buffer only
to write the encoded inode size to the lower file header.

Use a stack __be64 value instead. This avoids an unnecessary allocation
and removes a failure path without changing the data written to disk.

Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ecryptfs_write_inode_size_to_header() allocates an 8-byte buffer only
to write the encoded inode size to the lower file header.

Use a stack __be64 value instead. This avoids an unnecessary allocation
and removes a failure path without changing the data written to disk.

Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: show filename encryption options</title>
<updated>2026-07-21T03:12:46+00:00</updated>
<author>
<name>Yichong Chen</name>
<email>chenyichong@uniontech.com</email>
</author>
<published>2026-07-02T05:29:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=496ec2d0852a02d2e631771b5c439130b9c7dce7'/>
<id>496ec2d0852a02d2e631771b5c439130b9c7dce7</id>
<content type='text'>
ecryptfs_show_options() prints most user-visible mount options but
omits the filename encryption cipher and key size.

Print ecryptfs_fn_cipher and ecryptfs_fn_key_bytes when filename
encryption is enabled so that the displayed mount options reflect the
active filename encryption settings.

Fixes: 87c94c4df014 ("eCryptfs: Filename Encryption: mount option")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ecryptfs_show_options() prints most user-visible mount options but
omits the filename encryption cipher and key size.

Print ecryptfs_fn_cipher and ecryptfs_fn_key_bytes when filename
encryption is enabled so that the displayed mount options reflect the
active filename encryption settings.

Fixes: 87c94c4df014 ("eCryptfs: Filename Encryption: mount option")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: bound the packet-length peek to the user buffer</title>
<updated>2026-07-21T03:12:33+00:00</updated>
<author>
<name>Pengpeng Hou</name>
<email>pengpeng@iscas.ac.cn</email>
</author>
<published>2026-07-20T11:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=95540462e630edbc8504e9537d16453d6942d143'/>
<id>95540462e630edbc8504e9537d16453d6942d143</id>
<content type='text'>
ecryptfs_miscdev_write() accepts the minimum one-byte packet-length
encoding, but always copies the maximum two-byte encoding from userspace
before parsing it. A six-byte message therefore reads one byte beyond the
submitted user buffer.

Zero-initialize the peek buffer and copy only the packet-length bytes
present. The existing exact packet-size check still rejects truncated
two-byte encodings after the parser determines their encoded length.

Fixes: 8bf2debd5f7b ("eCryptfs: introduce device handle for userspace daemon communications")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Pengpeng Hou &lt;pengpeng@iscas.ac.cn&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ecryptfs_miscdev_write() accepts the minimum one-byte packet-length
encoding, but always copies the maximum two-byte encoding from userspace
before parsing it. A six-byte message therefore reads one byte beyond the
submitted user buffer.

Zero-initialize the peek buffer and copy only the packet-length bytes
present. The existing exact packet-size check still rejects truncated
two-byte encodings after the parser determines their encoded length.

Fixes: 8bf2debd5f7b ("eCryptfs: introduce device handle for userspace daemon communications")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Pengpeng Hou &lt;pengpeng@iscas.ac.cn&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: reject too-small tag 70 packets</title>
<updated>2026-07-21T03:11:14+00:00</updated>
<author>
<name>Yichong Chen</name>
<email>chenyichong@uniontech.com</email>
</author>
<published>2026-07-15T05:20:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e97bbe1b2bd82ec2ae37ad2e4965b4d3e78bbf7f'/>
<id>e97bbe1b2bd82ec2ae37ad2e4965b4d3e78bbf7f</id>
<content type='text'>
ecryptfs_parse_tag_70_packet() subtracts fixed metadata fields from the
parsed packet body size to derive the encrypted filename size.  A
malformed packet with a body smaller than those fixed fields can underflow
that size calculation.

Reject tag 70 packets before the subtraction unless the body contains the
signature, cipher code, and at least one byte of encrypted filename data.

Fixes: 9c79f34f7ee7 ("eCryptfs: Filename Encryption: Tag 70 packets")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ecryptfs_parse_tag_70_packet() subtracts fixed metadata fields from the
parsed packet body size to derive the encrypted filename size.  A
malformed packet with a body smaller than those fixed fields can underflow
that size calculation.

Reject tag 70 packets before the subtraction unless the body contains the
signature, cipher code, and at least one byte of encrypted filename data.

Fixes: 9c79f34f7ee7 ("eCryptfs: Filename Encryption: Tag 70 packets")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: fix tag 11 packet exact-fit size check</title>
<updated>2026-07-21T03:11:14+00:00</updated>
<author>
<name>Yichong Chen</name>
<email>chenyichong@uniontech.com</email>
</author>
<published>2026-07-15T05:20:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8b2ec0f56f55477f547d332526c9ae2a8fabc0a5'/>
<id>8b2ec0f56f55477f547d332526c9ae2a8fabc0a5</id>
<content type='text'>
parse_tag_11_packet() rejects a packet when the already-consumed tag and
length bytes plus the packet body exceed the caller supplied maximum
packet size.  The check currently adds one extra byte, even though
*packet_size already includes the tag byte before the length is parsed.

Remove the extra byte so a tag 11 packet that exactly fits the available
buffer is accepted while oversized packets are still rejected.

Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
parse_tag_11_packet() rejects a packet when the already-consumed tag and
length bytes plus the packet body exceed the caller supplied maximum
packet size.  The check currently adds one extra byte, even though
*packet_size already includes the tag byte before the length is parsed.

Remove the extra byte so a tag 11 packet that exactly fits the available
buffer is accepted while oversized packets are still rejected.

Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: pass packet set buffer size to parser</title>
<updated>2026-07-21T03:11:14+00:00</updated>
<author>
<name>Yichong Chen</name>
<email>chenyichong@uniontech.com</email>
</author>
<published>2026-07-15T05:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2602b79c5b3e2f6fce12e38a670f8e3fda4e46a2'/>
<id>2602b79c5b3e2f6fce12e38a670f8e3fda4e46a2</id>
<content type='text'>
ecryptfs_parse_packet_set() receives a pointer into the file header, but
it calculates the remaining packet buffer size from PAGE_SIZE - 8.  For
version 1 headers the packet set starts later in the header, so this can
overstate the available buffer.

Pass the actual packet set buffer length from the caller and calculate
per-packet limits from the remaining bytes in that buffer.  Recompute the
remaining length after consuming a tag 3 packet before parsing the
following tag 11 packet.

Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ecryptfs_parse_packet_set() receives a pointer into the file header, but
it calculates the remaining packet buffer size from PAGE_SIZE - 8.  For
version 1 headers the packet set starts later in the header, so this can
overstate the available buffer.

Pass the actual packet set buffer length from the caller and calculate
per-packet limits from the remaining bytes in that buffer.  Recompute the
remaining length after consuming a tag 3 packet before parsing the
following tag 11 packet.

Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
