Bug 1903126 (CVE-2020-28974)

Summary: CVE-2020-28974 kernel: slab-out-of-bounds read in fbcon
Product: [Other] Security Response Reporter: msiddiqu
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, bhu, blc, bmasney, brdeoliv, bskeggs, dhoward, dramseur, dvlasenk, esammons, fhrbata, hdegoede, hkrzesin, iboverma, itamar, jarodwilson, jeremy, jforbes, jglisse, jhunter, jlelli, jonathan, josef, jross, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, kmitts, lgoncalv, linville, masami256, mchehab, mcressma, mgala, mjg59, mjudeiki, mlangsdo, mrehak, nmurray, ptalbert, qzhao, rkeshri, rt-maint, rvrbovsk, steved, walters, williams, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds (OOB) SLAB memory access flaw was found in the Linux kernel's fbcon driver module. A bounds check failure allows a local attacker with special user privileges to gain access to out-of-bounds memory, leading to a system crash or leaking of internal kernel information. The highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 20:37:41 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: 1903128, 1903934, 1903935, 1903936, 1903937, 1903938, 1940053    
Bug Blocks: 1895876    

Description msiddiqu 2020-12-01 12:03:24 UTC
An out-of-bounds (OOB) SLAB memory access flaw was found in the fbcon driver module in the Linux kernel. A bounds check failure allows a local attacker with special user privilege to gain access to out-of-bounds memory leading to a system crash or a leak of internal kernel information. The highest threat from this vulnerability is to system availability.

This occurs because KD_FONT_OP_COPY in drivers/tty/vt/vt.c can be used for manipulations such as font height.

References: 
 
http://www.openwall.com/lists/oss-security/2020/11/25/1
https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.9.7
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3c4e0dff2095c579b142d5a0693257f1c58b4804
https://seclists.org/oss-sec/2020/q4/104

Comment 1 msiddiqu 2020-12-01 12:04:30 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1903128]

Comment 2 Justin M. Forbes 2020-12-01 13:49:19 UTC
This was fixed for Fedora with the 5.9.7 stable kernel updates.

Comment 6 Rohit Keshri 2020-12-03 09:40:33 UTC
Acknowledgments:

Name: Yuan Ming <yuanmingbuaa@gmail com> (Tsinghua University)

Comment 13 Rohit Keshri 2021-03-25 17:54:22 UTC
Mitigation:

Add 'nomodeset' option as kernel boot parameter to disable frame buffering in /etc/default/grub, and run 'grub2-mkconfig -o /boot/grub2/grub.cfg' and reboot.
~~~
# cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-147.el8.x86_64 root=/dev/mapper/rhel_rhel8u2--1-root ro crashkernel=auto resume=/dev/mapper/rhel_rhel8u2--1-swap rd.lvm.lv=rhel_rhel8u2-1/root rd.lvm.lv=rhel_rhel8u2-1/swap nomodeset

# ls -l /dev/fb*
ls: cannot access '/dev/fb*': No such file or directory
~~~

The above said mitigation does not so effect for rhel6 kernel , and is only applicable for rhel7/8.

Comment 14 Steve Barcomb 2021-04-09 01:09:50 UTC
*** Bug 1903934 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2021-05-18 13:20:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 16 errata-xmlrpc 2021-05-18 14:41:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 17 Product Security DevOps Team 2021-05-18 20:37:41 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-2020-28974