]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: fix base64 encoded name's length check in ceph_fname_to_usr()
authorXiubo Li <xiubli@redhat.com>
Fri, 11 Mar 2022 04:15:05 +0000 (12:15 +0800)
committerJeff Layton <jlayton@kernel.org>
Tue, 31 May 2022 15:49:59 +0000 (11:49 -0400)
commit8fa339b1855723c946207c52531ee5103dbbfcae
tree641c9c3702edf34dd728181d6c5a6b4c849a5ee2
parent31fd46624af5ac7f8fe3414bb2f1e5b4c6f70a05
ceph: fix base64 encoded name's length check in ceph_fname_to_usr()

The fname->name is based64_encoded names and the max long shouldn't
exceed the NAME_MAX.

The FSCRYPT_BASE64URL_CHARS(NAME_MAX) will be 255 * 4 / 3.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/crypto.c