Bug 1774946 (CVE-2019-19072) - CVE-2019-19072 kernel: A memory leak in the predicate_parse() function in kernel/trace/trace_events_filter.c allows for a DoS
Summary: CVE-2019-19072 kernel: A memory leak in the predicate_parse() function in ker...
Keywords:
Status: NEW
Alias: CVE-2019-19072
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1829952 1829953 1774947
Blocks: 1774948
TreeView+ depends on / blocked
 
Reported: 2019-11-21 10:23 UTC by Marian Rehak
Modified: 2020-05-12 08:29 UTC (History)
49 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way the predicate_parse function in the tracing subsystem of the Linux kernel handled resource cleanup on error. This flaw allows an attacker with the ability to produce the error to crash the system.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Marian Rehak 2019-11-21 10:23:25 UTC
A memory leak in the predicate_parse() function in kernel/trace/trace_events_filter.c in the Linux kernel through 5.3.11 allows attackers to cause a DoS (memory consumption).

Upstream Reference:

https://github.com/torvalds/linux/commit/96c5c6e6a5b6db592acae039fed54b5c8844cd35

Comment 1 Marian Rehak 2019-11-21 10:23:45 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1774947]

Comment 2 Evgenii Shatokhin 2019-11-22 16:06:01 UTC
Only root can manipulate ftrace filters, right?

Is there a way for an unprivileged user to trigger this memory leak?

Comment 4 Petr Matousek 2020-04-30 15:50:29 UTC
Statement:

This issue is rated as having Low impact because of the preconditions needed to trigger the error/resource cleanup code path (high privileges).

Comment 5 Petr Matousek 2020-04-30 15:52:58 UTC
In reply to comment #2:
> Only root can manipulate ftrace filters, right?
> 
> Is there a way for an unprivileged user to trigger this memory leak?

I'm not aware of one. Maybe perf with non paranoid setting. But that would still need privileged user to adjust the defaults.

Comment 6 Petr Matousek 2020-04-30 15:53:03 UTC
Mitigation:

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Comment 8 Jerome Marchand 2020-05-12 08:29:00 UTC
(In reply to Marian Rehak from comment #0)
> A memory leak in the predicate_parse() function in
> kernel/trace/trace_events_filter.c in the Linux kernel through 5.3.11 allows
> attackers to cause a DoS (memory consumption).
> 
> Upstream Reference:
> 
> https://github.com/torvalds/linux/commit/
> 96c5c6e6a5b6db592acae039fed54b5c8844cd35

Is this an actual issue or an hypothetical one? It seems to me that the error path that leads to the memory leak is unreachable. It's supposed to happen when the depth of the nested parentheses in the filter is deeper than expected, but the depth has just been calculated in calc_stack(). The parser code is quite complicated though, and I might have missed something.
On the other hand, I did hit another memory leak while trying to trigger the issue. It's fixed upstream by commit eea9be33cd19 ("tracing: Fix memory leak in create_filter()").


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