New Defects reported by Coverity Scan for libvirt
Hi, Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan. 1 new defect(s) introduced to libvirt found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 912259: Security best practices violations (TOCTOU) /src/util/virfile.c: 3335 in virFileChownFiles() _____________________________________________________________________________________________ *** CID 912259: Security best practices violations (TOCTOU) /src/util/virfile.c: 3335 in virFileChownFiles() 3329 while ((direrr = virDirRead(dir, &ent, name)) > 0) { 3330 g_autofree char *path = NULL; 3331 struct stat sb; 3332 3333 path = g_build_filename(name, ent->d_name, NULL); 3334
CID 912259: Security best practices violations (TOCTOU) Calling function "lstat" to perform check on "path".
3335 if (g_lstat(path, &sb) < 0) { 3336 virReportSystemError(errno, _("cannot stat '%1$s'"), path); 3337 return -1; 3338 } 3339 3340 if (!S_ISREG(sb.st_mode))
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libvirt?tab=overview
participants (1)
-
scan-admin@coverity.com