aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorJiangshan Yi <yijiangshan@kylinos.cn>2026-09-08 11:18:23 +0800
committerIlya Dryomov <idryomov@gmail.com>2026-10-26 14:15:47 +0100
commit71975d6e0db17646102488cf54480fda9de0f7a7 (patch)
tree840f09cddd7c2ee7e1e4928f03dccd299eeae50c /scripts/Makefile.thinlto
parentceph: use iov_iter_extract_bvecs() for direct I/O (diff)
ceph: fix longname buffer overflow in ceph_fname_to_usr()
Snapshot longname reconstruction formats "_<name>_<inode>" via snprintf() and memcpy()s the result into oname->name. Checking the length against NAME_MAX only protects the LOOKUPNAME/export callers, whose buffer is allocated with fscrypt_fname_alloc_buffer(NAME_MAX). The readdir path points oname->name straight at the altname in the MDS reply, whose capacity is altname_len; the reconstructed name can exceed that while still fitting under NAME_MAX, overflowing the in-place destination. Save the actual oname->len before the decryption overwrites it, and fail with -ENAMETOOLONG when the reconstructed name would not fit. Cc: stable@vger.kernel.org Fixes: dd66df0053ef ("ceph: add support for encrypted snapshot names") Suggested-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions