Project

General

Profile

Actions

Bug #49711

closed

cephfs-mirror: symbolic links do not get synchronized at times

Added by Venky Shankar about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
% 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.


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #49765: pacific: cephfs-mirror: symbolic links do not get synchronized at timesResolvedVenky ShankarActions
Actions #1

Updated by Venky Shankar about 3 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 40004
Actions #2

Updated by Venky Shankar about 3 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Backport Bot about 3 years ago

  • Copied to Backport #49765: pacific: cephfs-mirror: symbolic links do not get synchronized at times added
Actions #4

Updated by Loïc Dachary about 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF