<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/ecryptfs/keystore.c, branch v7.2-rc2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-05-11T14:53:14+00:00</updated>
<entry>
<title>ecryptfs: remove redundant variable found_auth_tok</title>
<updated>2026-05-11T14:53:14+00:00</updated>
<author>
<name>Alexey Velichayshiy</name>
<email>a.velichayshiy@ispras.ru</email>
</author>
<published>2026-04-12T13:50:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d97a37e2cedb008eb39354b2a4e2af9ae8bdbe7'/>
<id>urn:sha1:4d97a37e2cedb008eb39354b2a4e2af9ae8bdbe7</id>
<content type='text'>
The found_auth_tok variable is no longer needed, as the fact of finding
a token is determined directly by jumping to the found_matching_auth_tok
label inside the loop.

Remove found_auth_tok, simplifying the function logic.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Alexey Velichayshiy &lt;a.velichayshiy@ispras.ru&gt;
[tyhicks: Unsplit log message string]
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Replace memcpy + manual NUL termination with strscpy</title>
<updated>2026-03-26T03:39:27+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2026-02-05T12:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f7a1c0283f135833db164cc0fac8d422fed2079e'/>
<id>urn:sha1:f7a1c0283f135833db164cc0fac8d422fed2079e</id>
<content type='text'>
Use strscpy() to copy the NUL-terminated '-&gt;token.password.signature'
and 'sig' to the destination buffers instead of using memcpy() followed
by manual NUL terminations.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Drop redundant NUL terminations after calling ecryptfs_to_hex</title>
<updated>2025-12-23T21:23:23+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-11-20T22:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ba673331340dabcff4a3ca91cc67761ba74c518'/>
<id>urn:sha1:6ba673331340dabcff4a3ca91cc67761ba74c518</id>
<content type='text'>
ecryptfs_to_hex() already NUL-terminates the destination buffers. Drop
the manual NUL terminations.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Replace strcpy with strscpy in ecryptfs_cipher_code_to_string</title>
<updated>2025-12-23T21:23:23+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-12-13T11:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c82f77a4ac9589a5d73d4caaa439fa670c684455'/>
<id>urn:sha1:c82f77a4ac9589a5d73d4caaa439fa670c684455</id>
<content type='text'>
strcpy() has been deprecated [1] because it performs no bounds checking
on the destination buffer, which can lead to buffer overflows. Since
the parameter 'char *str' is just a pointer with no size information,
extend the function with a 'size' parameter to pass the destination
buffer's size as an additional argument. Adjust the call sites
accordingly.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: simplify list initialization in ecryptfs_parse_packet_set()</title>
<updated>2025-12-23T21:23:23+00:00</updated>
<author>
<name>Baolin Liu</name>
<email>liubaolin@kylinos.cn</email>
</author>
<published>2025-11-11T12:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c31c9bf9e2ff0d6c065ff7f2ccf8a1e95ddbb49'/>
<id>urn:sha1:5c31c9bf9e2ff0d6c065ff7f2ccf8a1e95ddbb49</id>
<content type='text'>
In ecryptfs_parse_packet_set(),use LIST_HEAD() to declare and
initialize the 'auth_tok_list' list in one step instead of
using INIT_LIST_HEAD() separately.

No functional change.

Signed-off-by: Baolin Liu &lt;liubaolin@kylinos.cn&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Fix packet format comment in parse_tag_67_packet()</title>
<updated>2025-12-23T21:23:23+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2024-10-18T21:41:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec25c4cf2db1ab1b91b8b4ba5296fb99e30debbe'/>
<id>urn:sha1:ec25c4cf2db1ab1b91b8b4ba5296fb99e30debbe</id>
<content type='text'>
s/TAG 65/TAG 67/

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: keystore: Fix typo 'the the' in comment</title>
<updated>2025-12-23T21:22:59+00:00</updated>
<author>
<name>Slark Xiao</name>
<email>slark_xiao@163.com</email>
</author>
<published>2022-07-22T10:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f9b0076ff05492aac2fb38129506892b81748cf'/>
<id>urn:sha1:0f9b0076ff05492aac2fb38129506892b81748cf</id>
<content type='text'>
Replace 'the the' with 'the' in the comment.

Signed-off-by: Slark Xiao &lt;slark_xiao@163.com&gt;
Signed-off-by: Tyler Hicks &lt;code@tyhicks.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Use MD5 library instead of crypto_shash</title>
<updated>2025-10-31T09:12:35+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2025-10-11T20:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bbb838f385aa7073510b727706a9c0215c8cd9f'/>
<id>urn:sha1:0bbb838f385aa7073510b727706a9c0215c8cd9f</id>
<content type='text'>
eCryptfs uses MD5 for a couple unusual purposes: to "mix" the key into
the IVs for file contents encryption (similar to ESSIV), and to prepend
some key-dependent bytes to the plaintext when encrypting filenames
(which is useless since eCryptfs encrypts the filenames with ECB).

Currently, eCryptfs computes these MD5 hashes using the crypto_shash
API.  Update it to instead use the MD5 library API.  This is simpler and
faster: the library doesn't require memory allocations, can't fail, and
provides direct access to MD5 without overhead such as indirect calls.

To preserve the existing behavior of eCryptfs support being disabled
when the kernel is booted with "fips=1", make ecryptfs_get_tree() check
fips_enabled itself.  Previously it relied on crypto_alloc_shash("md5")
failing.  I don't know for sure that this is actually needed; e.g., it
could be argued that eCryptfs's use of MD5 isn't for a security purpose
as far as FIPS is concerned.  But this preserves the existing behavior.

Tested by verifying that an existing eCryptfs can still be mounted with
a kernel that has this commit, with all the files matching.  Also tested
creating a filesystem with this commit and mounting+reading it without.

Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Link: https://patch.msgid.link/20251011200010.193140-1-ebiggers@kernel.org
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
</feed>
