Bug 1597063 (CVE-2018-1000622) - CVE-2018-1000622 rust: rustdoc loads plugins from world writable directory allowing for arbitrary code execution
Summary: CVE-2018-1000622 rust: rustdoc loads plugins from world writable directory al...
Alias: CVE-2018-1000622
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1599103 1599104 1599904 1881812
Blocks: 1597064
TreeView+ depends on / blocked
Reported: 2018-07-02 00:51 UTC by Sam Fowler
Modified: 2021-02-17 00:02 UTC (History)
11 users (show)

Fixed In Version: rust 1.27.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-08-10 19:13:59 UTC

Attachments (Terms of Use)

Description Sam Fowler 2018-07-02 00:51:25 UTC
rustdoc in versions of Rust through 1.26 loads plugins by default from the world writable directory, /tmp/rustdoc/plugins/. An attacker could exploit this by writing a malicious library to this directory allowing for invocations of rustdoc to execute arbitrary code.

Comment 2 Josh Stone 2018-07-02 16:27:47 UTC
IMO this has low impact.  rustdoc will only load external libraries if given the --plugins option, and /tmp/rustdoc/plugins/ is only used if not given a --plugin-path.  Both of these plugin options are deprecated and print warnings as such when you use them.

    $ rustdoc foo/src/lib.rs --plugin-path /dev/null
    WARNING: the 'plugin-path' flag is considered deprecated
    WARNING: please see https://github.com/rust-lang/rust/issues/44136

Comment 4 Sam Fowler 2018-07-08 23:51:24 UTC

Name: Lubomir Rintel (Red Hat)

Comment 5 Sam Fowler 2018-07-08 23:51:55 UTC
Created rust tracking bugs for this issue:

Affects: epel-7 [bug 1599104]
Affects: fedora-all [bug 1599103]

Comment 7 Josh Stone 2018-08-03 14:27:55 UTC
Igor, why did you close this?  Bug 1599104 for epel7 is still in testing.
(long bodhi time to stable, and I accidentally reset it with 1.27.2)

Comment 8 Josh Stone 2018-08-10 19:13:59 UTC
Now epel7 is on stable too.

Comment 10 Marco Benatto 2020-04-07 21:03:31 UTC
The rust version shipped by Developers Toolset on Red Hat Enterprise Linux is affected by this issue.
The fix was made available through the following errata:

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