(CVE-2012-3386) CVE-2012-3386 automake: locally exploitable "make distcheck" bug

Bug #1023960 reported by Karma Dorje
264
This bug affects 2 people
Affects Status Importance Assigned to Milestone
automake (Debian)
Fix Released
Unknown
automake (Fedora)
Fix Released
Low
automake (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

Stefano Lattarini discovered a vulnerability in automake
that is much like the one that prompted CVE-2009-4029:
automake's distcheck rule makes distdir briefly world-writable.
Stefano also wrote the patch below.

This bug is slightly more limited because it affects only the
"make distcheck" rule, while CVE-2009-4029 affected all dist* rules.

The point is that with these temporarily-relaxed directory permissions,
an attacker can cause the person running "make distcheck" in an attacker-
accessible (o+rx, or possibly only o+x) directory to run arbitrary code.

Version-Release number of selected component (if applicable):
 everything prior to v1.12.1-214-g15b8b62

How reproducible:
The directory is world-writable only briefly, but the flaw is
exploitable.

http://thread.gmane.org/gmane.comp.sysutils.automake.patches/8572

CVE References

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

Description of problem:
Stefano Lattarini discovered a vulnerability in automake
that is much like the one that prompted CVE-2009-4029:
automake's distcheck rule makes distdir briefly world-writable.
Stefano also wrote the patch below.

This bug is slightly more limited because it affects only the
"make distcheck" rule, while CVE-2009-4029 affected all dist* rules.

The point is that with these temporarily-relaxed directory permissions,
an attacker can cause the person running "make distcheck" in an attacker-
accessible (o+rx, or possibly only o+x) directory to run arbitrary code.

Version-Release number of selected component (if applicable):
  everything prior to v1.12.1-214-g15b8b62

How reproducible:
The directory is world-writable only briefly, but the flaw is
exploitable.

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

Created attachment 596864
planned fix

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

FYI, Stefano wrote:

  "git blame" tells me that the offending "chmod a+w" command has been there
  (ignoring trivial changes and code movements) since almost "forever" (at
  least since commit 6a60072d, where configure.in defines an Automake
  version of 1.4a).

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

Stefano plans to release fixed automake in the next day or so.

Revision history for this message
In , Stefan (stefan-redhat-bugs) wrote :

Thank you very much for reporting this.

Do you need a new CVE for this, or is there already a CVE request/assignment in progress?

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

Yes, please. If you can give us a CVE number, that'd be welcome.

Revision history for this message
In , Stefan (stefan-redhat-bugs) wrote :

(In reply to comment #5)
> Yes, please. If you can give us a CVE number, that'd be welcome.

Please use CVE-2012-3386 for this issue. Thanks!

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

The patch/bug are now public:

  http://thread.gmane.org/gmane.comp.sysutils.automake.patches/8572

In addition, GNU Automake 1.12.2 (with this fix) has been released.

Revision history for this message
In , Vincent (vincent-redhat-bugs) wrote :

Created automake17 tracking bugs for this issue

Affects: fedora-all [bug 838661]

Revision history for this message
In , Vincent (vincent-redhat-bugs) wrote :

Created automake tracking bugs for this issue

Affects: fedora-all [bug 838660]

Revision history for this message
In , Stefan (stefan-redhat-bugs) wrote :
Karma Dorje (taaroa)
visibility: private → public
Changed in automake (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in automake (Debian):
status: Unknown → Fix Released
Revision history for this message
In , Murray (murray-redhat-bugs) wrote :

Acknowledgements:

Red Hat would like to thank Jim Meyering for reporting this issue. Upstream acknowledges Stefano Lattarini as the original reporter.

Revision history for this message
In , errata-xmlrpc (errata-xmlrpc-redhat-bugs) wrote :

This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2013:0526 https://rhn.redhat.com/errata/RHSA-2013-0526.html

Revision history for this message
In , Huzaifa (huzaifa-redhat-bugs) wrote :

Statement:

This issue affects the version of automake15, automake16 and automake17 as shipped with Red Hat Enterprise Linux 5. This issue affects the version of automake15 and automake16 as shipped with Red Hat Enterprise Linux 6. A future update may address this flaw in various affected versions of automake.

Revision history for this message
In , Martin (martin-redhat-bugs) wrote :

IssueDescription:

It was found that the distcheck rule in Automake-generated Makefiles made a directory world-writable when preparing source archives. If a malicious, local user could access this directory, they could execute arbitrary code with the privileges of the user running "make distcheck".

Revision history for this message
In , errata-xmlrpc (errata-xmlrpc-redhat-bugs) wrote :

This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5

Via RHSA-2014:1243 https://rhn.redhat.com/errata/RHSA-2014-1243.html

Changed in automake (Fedora):
importance: Unknown → Low
status: Unknown → Fix Released
Changed in automake (Ubuntu):
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.