Bug 1781674 (CVE-2019-19448) - CVE-2019-19448 kernel: mounting a crafted btrfs filesystem image, performing some operations, and then making a syncfs system call can lead to a use-after-free in try_merge_free_space in fs/btrfs/free-space-cache.c
Summary: CVE-2019-19448 kernel: mounting a crafted btrfs filesystem image, performing ...
Keywords:
Status: NEW
Alias: CVE-2019-19448
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1781675 1804053 1804054 1804055
Blocks: 1781677
TreeView+ depends on / blocked
 
Reported: 2019-12-10 11:34 UTC by Marian Rehak
Modified: 2020-02-19 20:56 UTC (History)
47 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel's implementation of BTRFS free space management, where the kernel does not correctly manage the lifetime of internal data structures used. An attacker could use this flaw to corrupt memory or escalate privileges.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Marian Rehak 2019-12-10 11:34:30 UTC
A flaw was found in the Linux kernels BTRFS implementation where a local privileged attacker can mount a crafted BRTFS disk or image, modify files from the mount point then sync() the disk image.  During the syncfs procedure, the kernel will attempt to consolidate free space and will cause a use-after-free while rebalancing an in-memory red-black tree.

This could lead to memory corruption, kernel panic and possibly privilege escalation.


External Reference:

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

Comment 1 Marian Rehak 2019-12-10 11:34:51 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1781675]

Comment 3 Wade Mealing 2020-02-18 04:59:10 UTC
This flaw is rated as a moderate as it requires above normal user privileges to mount and unmount a BTRFS filesystem in a server environment.

Comment 5 Wade Mealing 2020-02-18 05:12:06 UTC
Mitigation:


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

As the BTRFS module will be auto-loaded when required, autoloading can be prevented by disabling the module, see KCS article https://access.redhat.com/solutions/41278 or contact Red Hat Global Support Services.


Note You need to log in before you can comment on or make changes to this bug.