Bug 1784923 (CVE-2019-19816)

Summary: CVE-2019-19816 kernel: out-of-bounds write in __btrfs_map_block in fs/btrfs/volumes.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, airlied, bdettelb, bhu, blc, brdeoliv, bskeggs, cmaiolin, dhoward, dvlasenk, esammons, fhrbata, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jlelli, john.j5live, jonathan, josef, jross, jschorr, jshortt, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, masami256, matt, mchehab, mcressma, mjg59, mlangsdo, nmurray, qzhao, rt-maint, rvrbovsk, steved, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the implementation of the BTRFS file system code in the Linux kernel. An attacker, who is able to mount a crafted BTRFS filesystem and perform common filesystem operations, can possibly cause an out-of-bounds write to memory. This could lead to memory corruption or privilege escalation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-01 09:04:21 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: 1784925, 1819509, 1819510, 1819511, 1819512, 1819513    
Bug Blocks: 1784924    

Description Guilherme de Almeida Suckevicz 2019-12-18 17:58:57 UTC
A flaw was found in the implementation of the BTRFS file system code.  An attacker who is able to mount (or convince someone to mount) a crafted BTRFS filesystem and performing common filesystem operations can possibly cause an out-of-bounds write to memory.

This could lead to memory corruption or possibly privilege escalation.  

Reference:
https://github.com/bobfuzzer/CVE/tree/master/CVE-2019-19816

Comment 1 Guilherme de Almeida Suckevicz 2019-12-18 17:59:55 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1784925]

Comment 8 Eric Christensen 2020-04-01 15:53:10 UTC
Mitigation:

As the BTRFS module will be auto-loaded when required, its use can be disabled by preventing the module from loading with the following instructions:

# echo "install btrfs /bin/true" >> /etc/modprobe.d/disable-btrfs.conf

The system will need to be restarted if the BTRFS modules are loaded, it may be possible to unload them. In most circumstances, the BTRFS kernel modules will be unable to be unloaded while any BTRFS filesystems are mounted or in use.

If the system requires this module to work correctly, this mitigation may not be suitable.

If you need further assistance, see KCS article https://access.redhat.com/solutions/41278 or contact Red Hat Global Support Services.

Comment 9 Petr Matousek 2020-04-03 04:42:44 UTC
Statement:

This flaw is rated as having Moderate impact, the attacker would require physical access to the system and also a local account to abuse the use-after-free.

Comment 10 Justin M. Forbes 2020-06-26 17:14:47 UTC
This was fixed for Fedora with the 5.2 kernel rebases.