Bug 847715 (CVE-2012-3480)

Summary: CVE-2012-3480 glibc: Integer overflows, leading to stack-based buffer overflows in strto* related routines
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: djorm, fweimer, jakub, jrusnack, law, mfranc, pfrankli, schwab
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20120812,reported=20120813,source=upstream,cvss2=4.4/AV:L/AC:M/Au:N/C:P/I:P/A:P,rhel-5/glibc=affected,rhel-6/glibc=affected,fedora-all/glibc=affected,cwe=CWE-190->CWE-121[auto]
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-10 23:13:20 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 847718, 847929, 847930, 847931, 847932    
Bug Blocks: 847721    

Description Jan Lieskovsky 2012-08-13 06:46:46 EDT
Multiple integer overflows, leading to stack-based buffer overflows were found in various stdlib functions of GNU libc (strtod, strtof, strtold, strtod_l and related routines). If an application, using the affected stdlib functions, did not perform user-level sanitization of provided inputs, a local attacker could use this flaw to cause such an application to crash or, potentially, execute arbitrary code with the privileges of the user running the application.

Upstream bug report:
[1] http://sourceware.org/bugzilla/show_bug.cgi?id=14459

Upstream patch (might not be the final one):
[2] http://sourceware.org/ml/libc-alpha/2012-08/msg00202.html
Comment 1 Jan Lieskovsky 2012-08-13 06:53:31 EDT
This issue affects the versions of the glibc package, as shipped with Red Hat Enterprise Linux 5 and 6.

--

This issue affects the versions of the glibc package, as shipped with Fedora release of 16 and 17. Please schedule an update.
Comment 2 Jan Lieskovsky 2012-08-13 06:54:23 EDT
CVE request:
[3] http://www.openwall.com/lists/oss-security/2012/08/13/4
Comment 3 Jan Lieskovsky 2012-08-13 06:55:13 EDT
Created glibc tracking bugs for this issue

Affects: fedora-all [bug 847718]
Comment 4 Jan Lieskovsky 2012-08-13 06:56:29 EDT
Sample reproducer from upstream bug [1]:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define EXPONENT "e-2147483649"
#define SIZE 214748364

int
main (void)
{
  char *p = malloc (1 + SIZE + sizeof (EXPONENT));
  if (p == NULL)
    {
      perror ("malloc");
      exit (EXIT_FAILURE);
    }
  p[0] = '1';
  memset (p + 1, '0', SIZE);
  memcpy (p + 1 + SIZE, EXPONENT, sizeof (EXPONENT));
  double d = strtod (p, NULL);
  printf ("%a\n", d);
  exit (EXIT_SUCCESS);
}
Comment 6 Fedora Update System 2012-08-17 21:29:57 EDT
glibc-2.15-56.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 errata-xmlrpc 2012-08-27 09:09:40 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:1208 https://rhn.redhat.com/errata/RHSA-2012-1208.html
Comment 8 errata-xmlrpc 2012-08-27 09:09:51 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2012:1207 https://rhn.redhat.com/errata/RHSA-2012-1207.html
Comment 9 Fedora Update System 2012-08-27 18:59:44 EDT
glibc-2.14.90-24.fc16.9 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 errata-xmlrpc 2012-09-13 12:51:57 EDT
This issue has been addressed in following products:

  RHEV-H, V2V and Agents for RHEL-5

Via RHSA-2012:1262 https://rhn.redhat.com/errata/RHSA-2012-1262.html
Comment 11 Fedora Update System 2012-09-17 19:50:54 EDT
glibc-2.16-8.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 errata-xmlrpc 2012-10-02 13:11:18 EDT
This issue has been addressed in following products:

  RHEV-H and Agents for RHEL-6

Via RHSA-2012:1325 https://rhn.redhat.com/errata/RHSA-2012-1325.html