]> git.ipfire.org Git - thirdparty/linux.git/commit
prep for ceph_encode_encrypted_fname() fixes
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 15 Feb 2025 04:27:45 +0000 (23:27 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 17 Jun 2025 21:57:49 +0000 (17:57 -0400)
commit28032ef879b6ab073bb8c85f2044edaf6b80c929
tree15bc17f080717d290a3772aa43096868c91b477a
parent101841c38346f4ca41dc1802c867da990ffb32eb
prep for ceph_encode_encrypted_fname() fixes

ceph_encode_encrypted_dname() would be better off with plaintext name
already copied into buffer; we'll lift that into the callers on the
next step, which will allow to fix UAF on races with rename; for now
copy it in the very beginning of ceph_encode_encrypted_dname().

That has a pleasant side benefit - we don't need to mess with tmp_buf
anymore (i.e. that's 256 bytes off the stack footprint).

Tested-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ceph/crypto.c