Bug 1406269 (CVE-2016-10009) - CVE-2016-10009 openssh: loading of untrusted PKCS#11 modules in ssh-agent
Summary: CVE-2016-10009 openssh: loading of untrusted PKCS#11 modules in ssh-agent
Status: CLOSED WONTFIX
Alias: CVE-2016-10009
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: impact=moderate,public=20161219,repor...
Keywords: Security
Depends On: 1406296
Blocks: 1406299 1415638
TreeView+ depends on / blocked
 
Reported: 2016-12-20 07:40 UTC by Martin Prpič
Modified: 2017-11-28 22:42 UTC (History)
8 users (show)

(edit)
It was found that ssh-agent could load PKCS#11 modules from arbitrary paths. An attacker having control of the forwarded agent-socket on the server, and the ability to write to the filesystem of the client host, could use this flaw to execute arbitrary code with the privileges of the user running ssh-agent.
Clone Of:
(edit)
Last Closed: 2017-01-16 05:55:09 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2029 normal SHIPPED_LIVE Moderate: openssh security, bug fix, and enhancement update 2017-08-01 18:11:55 UTC

Description Martin Prpič 2016-12-20 07:40:41 UTC
It was found that ssh-agent could load PKCS#11 modules from paths outside of a trusted whitelist. An attacker able to load a crafted PKCS#11 module across a forwarded agent channel could potentially use this flaw to execute arbitrary code on the system running the ssh-agent. Note that the attacker must have control of the forwarded agent-socket and the ability to write to the filesystem of the host running ssh-agent.

This issue was fixed by only allowing the loading of module from a trusted (and configurable) whitelist.

CVE assignment:

http://seclists.org/oss-sec/2016/q4/708

Upstream patch:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/ssh-agent.c.diff?r1=1.214&r2=1.215&sortby=date&f=h

Comment 1 Martin Prpič 2016-12-20 07:40:58 UTC
External References:

https://www.openssh.com/txt/release-7.4

Comment 2 Andrej Nemec 2016-12-20 08:41:15 UTC
Created openssh tracking bugs for this issue:

Affects: fedora-all [bug 1406296]

Comment 3 Jakub Jelen 2017-01-03 14:38:10 UTC
If we will want to fix it, we need to change the whitelist to something reasonable, because all of our PKCS#11 libraries are on x68_64 under /usr/lib64/
See the upstream discussion:

http://lists.mindrot.org/pipermail/openssh-unix-dev/2017-January/035631.html

Comment 4 Huzaifa S. Sidhpurwala 2017-01-16 05:55:09 UTC
Statement:

In order to exploit this flaw, the attacker needs to have control of the forwarded agent-socket and the ability to write to the filesystem of the host running ssh-agent. Because of this restriction for successful exploitation, this issue has been rated as having Moderate security impact. A future update may address this flaw.

Comment 5 errata-xmlrpc 2017-08-01 18:45:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2029 https://access.redhat.com/errata/RHSA-2017:2029


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