CVE-2023-27561: Bump runc go module v1.1.4 -> v1.1.5

This commit is contained in:
Pushkar Joglekar
2023-04-04 21:41:29 -07:00
parent 330b5a2b8d
commit e450ed9812
6 changed files with 82 additions and 44 deletions

View File

@@ -293,8 +293,18 @@ func generateDeviceProperties(r *configs.Resources) ([]systemdDbus.Property, err
// rules separately to systemd) we can safely skip entries that don't
// have a corresponding path.
if _, err := os.Stat(entry.Path); err != nil {
logrus.Debugf("skipping device %s for systemd: %s", entry.Path, err)
continue
// Also check /sys/dev so that we don't depend on /dev/{block,char}
// being populated. (/dev/{block,char} is populated by udev, which
// isn't strictly required for systemd). Ironically, this happens most
// easily when starting containerd within a runc created container
// itself.
// We don't bother with securejoin here because we create entry.Path
// right above here, so we know it's safe.
if _, err := os.Stat("/sys" + entry.Path); err != nil {
logrus.Warnf("skipping device %s for systemd: %s", entry.Path, err)
continue
}
}
}
deviceAllowList = append(deviceAllowList, entry)