summaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpiutil.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-02-14 23:37:58 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2025-06-17 17:58:14 -0400
commit0d2da2561bdeb459b6c540c2417a15c1f8732e6a (patch)
treeace92e44f378939e3cdcb75911e7de708a129d2e /lib/crypto/mpi/mpiutil.c
parent28032ef879b6ab073bb8c85f2044edaf6b80c929 (diff)
ceph: fix a race with rename() in ceph_mdsc_build_path()
Lift copying the name into callers of ceph_encode_encrypted_dname() that do not have it already copied; ceph_encode_encrypted_fname() disappears. That fixes a UAF in ceph_mdsc_build_path() - while the initial copy of plaintext into buf is done under ->d_lock, we access the original name again in ceph_encode_encrypted_fname() and that is done without any locking. With ceph_encode_encrypted_dname() using the stable copy the problem goes away. 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>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions