Hi,

Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan.

Defect Details

** 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))

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team