Actions
Bug #49711
closedcephfs-mirror: symbolic links do not get synchronized at times
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Due to this problematic code in src/tools/cephfs_mirror/PeerReplayer.cc:
char *target = (char *)alloca(stx.stx_size+1); r = ceph_readlink(m_local_mount, local_path.c_str(), target, stx.stx_size); if (r < 0) { derr << ": failed to readlink local path=" << local_path << ": " << cpp_strerror(r) << dendl; return r; } r = ceph_symlink(m_remote_mount, target, remote_path.c_str()); if (r < 0 && r != EEXIST) { derr << ": failed to symlink remote path=" << remote_path << " to target=" << target << ": " << cpp_strerror(r) << dendl; return r; }
`target` is not null-terminated resulting in possible garbage-suffixed target getting created on the remote filesystem.
Actions