{
  "threat_severity" : "Important",
  "public_date" : "2020-01-30T00:00:00Z",
  "bugzilla" : {
    "description" : "sudo: Stack based buffer overflow when pwfeedback is enabled",
    "id" : "1796944",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1796944"
  },
  "cvss3" : {
    "cvss3_base_score" : "7.8",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-121",
  "details" : [ "In Sudo before 1.8.26, if pwfeedback is enabled in /etc/sudoers, users can trigger a stack-based buffer overflow in the privileged sudo process. (pwfeedback is a default setting in Linux Mint and elementary OS; however, it is NOT the default for upstream and many other packages, and would exist only if enabled by an administrator.) The attacker needs to deliver a long string to the stdin of getln() in tgetpass.c.", "A flaw was found in the Sudo application when the ’pwfeedback' option is set to true on the sudoers file. An authenticated user can use this vulnerability to trigger a stack-based buffer overflow under certain conditions even without Sudo privileges. The buffer overflow may allow an attacker to expose or corrupt memory information, crash the Sudo application, or possibly inject code to be run as a root user." ],
  "statement" : "This flaw can only be exploited if the option `pwfeedback` is enabled in sudo configuration. This option is not enabled by default in any version of Red Hat Enterprise Linux.\nThe sudo packages distributed with Red Hat Enterprise Linux versions are compiled using gcc's stack-protector feature. The \"Stack Smashing Protection\" may help mitigate code execution attacks for this flaw.\nRed Hat Enterprise Linux 5 is not affected as it doesn't include the commit which introduced the vulnerability.",
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "release_date" : "2020-03-05T00:00:00Z",
    "advisory" : "RHSA-2020:0726",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6",
    "package" : "sudo-0:1.8.6p3-29.el6_10.3"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "release_date" : "2020-02-19T00:00:00Z",
    "advisory" : "RHSA-2020:0540",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7",
    "package" : "sudo-0:1.8.23-4.el7_7.2"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2020-02-14T00:00:00Z",
    "advisory" : "RHSA-2020:0487",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8",
    "package" : "sudo-0:1.8.25p1-8.el8_1.1"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.0 Update Services for SAP Solutions",
    "release_date" : "2020-02-14T00:00:00Z",
    "advisory" : "RHSA-2020:0509",
    "cpe" : "cpe:/o:redhat:rhel_e4s:8.0",
    "package" : "sudo-0:1.8.25p1-4.el8_0.3"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 5",
    "fix_state" : "Not affected",
    "package_name" : "sudo",
    "cpe" : "cpe:/o:redhat:enterprise_linux:5"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2019-18634\nhttps://nvd.nist.gov/vuln/detail/CVE-2019-18634\nhttps://www.sudo.ws/alerts/pwfeedback.html" ],
  "name" : "CVE-2019-18634",
  "mitigation" : {
    "value" : "Please follow the steps bellow as mitigation:\n1. Check the default properties set for sudo by running:\n~~~\n$ sudo -l\n[sudo] password for user:\nMatching Defaults entries for users on localhost:\n!visiblepw, pwfeedback, always_set_home, match_group_by_gid, always_query_group_plugin, env_reset, env_keep=\"COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS\",\nenv_keep+=\"MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE\", env_keep+=\"LC_COLLATE LC_IDENTIFICATION\nLC_MEASUREMENT LC_MESSAGES\", env_keep+=\"LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE\", env_keep+=\"LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY\", secure_path=/sbin\\:/bin\\:/usr/sbin\\:/usr/bin\n~~~\n2. If `pwfeedback` is enabled as shown above, edit your `/etc/sudoers` file, changing the line:\n~~~\nDefaults pwfeedback\n~~~\nTo:\n~~~\nDefaults !pwfeedback\n~~~\nThis will disable visual feedback on password typing, making sure the attack is not possible anymore.",
    "lang" : "en:us"
  },
  "csaw" : false
}