Bug 1926263 (CVE-2021-20233)

Summary: CVE-2021-20233 grub2: Heap out-of-bounds write due to miscalculation of space required for quoting
Product: [Other] Security Response Reporter: Marco Benatto <mbenatto>
Component: vulnerabilityAssignee: Javier Martinez Canillas <fmartine>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bootloader-eng-team, fmartine, jhlavac, lkundrak, pjanda, pjones, rhughes, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: grub 2.06 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in grub2. Setparam_prefix() in the menu rendering code performs a length calculation on the assumption that expressing a quoted single quote will require 3 characters, while it actually requires 4 characters which allows an attacker to corrupt memory by one byte for each quote in the input. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-03 01:02:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1932791, 1932973, 1932974, 1932975, 1932976, 1932977, 1932978, 1932983, 1932984, 1932985, 1932986, 1932987, 1932988, 1932989, 1932990, 1932991, 1932992, 1932993, 1932994, 1932995, 1932996, 1932997, 1932998, 1932999, 1933000, 1933001, 1933002, 1933003, 1933004, 1933005, 1933006, 1933007, 1933008, 1933009, 1933010, 1933011, 1933012, 1933014, 1933015, 1934252, 1991034, 1991035, 1991036, 1991037, 1991038, 1991040    
Bug Blocks: 1899965, 1926372    

Description Marco Benatto 2021-02-08 14:18:19 UTC
There's a flaw on grub2 menu rendering code setparam_prefix() in the menu rendering code performs a length calculation on the assumption that expressing a quoted single quote will require 3 characters, while it actually requires 4 characters. This allow an attacker to corrupt memory by one byte for each quote in the input.

Comment 2 Marian Rehak 2021-02-23 11:10:34 UTC
*** Bug 1927436 has been marked as a duplicate of this bug. ***

Comment 6 Marco Benatto 2021-03-02 18:40:48 UTC
Created grub2 tracking bugs for this issue:

Affects: fedora-all [bug 1934252]

Comment 7 errata-xmlrpc 2021-03-02 19:17:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:0698 https://access.redhat.com/errata/RHSA-2021:0698

Comment 8 errata-xmlrpc 2021-03-02 19:21:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:0696 https://access.redhat.com/errata/RHSA-2021:0696

Comment 9 errata-xmlrpc 2021-03-02 19:25:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:0697 https://access.redhat.com/errata/RHSA-2021:0697

Comment 10 errata-xmlrpc 2021-03-02 19:36:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Advanced Update Support

Via RHSA-2021:0703 https://access.redhat.com/errata/RHSA-2021:0703

Comment 11 errata-xmlrpc 2021-03-02 19:53:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.2 Advanced Update Support

Via RHSA-2021:0704 https://access.redhat.com/errata/RHSA-2021:0704

Comment 12 errata-xmlrpc 2021-03-02 20:09:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support
  Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.4 Telco Extended Update Support

Via RHSA-2021:0702 https://access.redhat.com/errata/RHSA-2021:0702

Comment 13 errata-xmlrpc 2021-03-02 20:48:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2021:0699 https://access.redhat.com/errata/RHSA-2021:0699

Comment 14 errata-xmlrpc 2021-03-02 20:50:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.7 Extended Update Support

Via RHSA-2021:0700 https://access.redhat.com/errata/RHSA-2021:0700

Comment 15 errata-xmlrpc 2021-03-02 21:02:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Extended Update Support

Via RHSA-2021:0701 https://access.redhat.com/errata/RHSA-2021:0701

Comment 16 Product Security DevOps Team 2021-03-03 01:02:18 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-20233

Comment 17 errata-xmlrpc 2021-05-18 14:37:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1734 https://access.redhat.com/errata/RHSA-2021:1734

Comment 18 errata-xmlrpc 2021-06-29 16:26:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:2566 https://access.redhat.com/errata/RHSA-2021:2566

Comment 19 errata-xmlrpc 2021-07-20 22:09:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:2790 https://access.redhat.com/errata/RHSA-2021:2790

Comment 20 errata-xmlrpc 2021-09-28 14:34:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:3675 https://access.redhat.com/errata/RHSA-2021:3675