Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Lustre 2.8.0, Lustre 2.5.5
-
None
-
3
-
9223372036854775807
Description
In mgc_llog_local_copy, the temp_log name allocation is a byte shorter than it should be, which will cause bufer over-run in the following sprintf.
static int mgc_llog_local_copy(const struct lu_env *env, struct obd_device *obd, struct llog_ctxt *rctxt, struct llog_ctxt *lctxt, char *logname) { char *temp_log; int rc; ENTRY; /* * - copy it to backup using llog_backup() * - copy remote llog to logname using llog_backup() * - if failed then move bakup to logname again */ OBD_ALLOC(temp_log, strlen(logname) + 1); if (!temp_log) RETURN(-ENOMEM); sprintf(temp_log, "%sT", logname);