{
  "threat_severity" : "Moderate",
  "public_date" : "2023-02-28T00:00:00Z",
  "bugzilla" : {
    "description" : "sudo: double free with per-command chroot sudoers rules",
    "id" : "2174218",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2174218"
  },
  "cvss3" : {
    "cvss3_base_score" : "6.4",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H",
    "status" : "draft"
  },
  "cwe" : "CWE-415",
  "details" : [ "Sudo before 1.9.13p2 has a double free in the per-command chroot feature.", "A double-free vulnerability was found in Sudo in the per-command chroot feature. This flaw exists due to a boundary error when matching a sudoer rule that contains a per-command chroot directive (CHROOT=dir). By sending a specially-crafted request, a local privileged attacker can elevate privileges and execute arbitrary code on the system." ],
  "statement" : "The CHROOT support was only added in Sudo v1.9.3 and Sudo v1.9.8 included a fix for a memory leak in the set_cmnd_path() function, which can result in the \"user_cmnd\" variable being freed twice, but only when processing a sudoers rule that contains a \"CHROOT\" setting. This does not affect the \"chroot\" Defaults setting. Only a per-rule \"CHROOT\" setting will trigger the bug.\nHence, it only affects Sudo v1.9.8 through to 1.9.13p1. \nRed Hat Enterprise Linux - 6, 7, 8, 9 are shipped with lower versions of Sudo that doesn't contains the vulnerable code. Thus, they are not affected.",
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "sudo",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "sudo",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "sudo",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "sudo",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2023-27320\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-27320\nhttps://www.openwall.com/lists/oss-security/2023/02/28/1\nhttps://www.sudo.ws/releases/stable/#1.9.13p2" ],
  "name" : "CVE-2023-27320",
  "csaw" : false
}