First published: Fri Jun 24 2022(Updated: )
A buffer overflow was found in get_keys get_keys() When calculating the greatest possible number of matching keys in get_keys(), the current expression MIN (1, ks->nr_keys) is wrong -- it will return at most 1. If all "nr_keys" keys match however, then we require "nr_keys" non-NULL entries in the result array; in other words, we need MAX (1, ks->nr_keys) (The comment just above the expression is correct; the code is wrong.) This buffer overflow is easiest to trigger in those guestfs tools that parse the "--key" option in C; that is, with "OPTION_key". For example, the command $ virt-cat $(seq -f '--key /dev/sda2:key:%g' 200) -d DOMAIN /no-such-file which passes 200 (different) passphrases for the LUKS-encrypted block device "/dev/sda2", crashes with a SIGSEGV.
Credit: secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
Libguestfs Libguestfs | ||
Redhat Enterprise Linux | =8.0 | |
Redhat Enterprise Linux | =8.0 | |
Redhat Enterprise Linux | =9.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of CVE-2022-2211 is medium with a severity value of 6.5.
Libguestfs and Redhat Enterprise Linux versions 8.0 and 9.0 are affected by CVE-2022-2211.
CVE-2022-2211 leads to a denial of service by miscalculating the greatest possible number of matching keys in the get_keys() function.
To fix CVE-2022-2211, you should update to the latest version of libguestfs or Redhat Enterprise Linux that includes the necessary security patches.
You can find more information about CVE-2022-2211 in the following references: - Bugzilla: https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2101279 - Red Hat Security Advisory: https://access.redhat.com/security/cve/CVE-2022-2211 - Libguestfs Mailing List: https://listman.redhat.com/archives/libguestfs/2022-June/029274.html