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:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-11 03:13:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 847718, 847929, 847930, 847931, 847932    
Bug Blocks: 847721    

Description Jan Lieskovsky 2012-08-13 10:46:46 UTC
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 10:53:31 UTC
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 10:54:23 UTC
CVE request:
[3] http://www.openwall.com/lists/oss-security/2012/08/13/4

Comment 3 Jan Lieskovsky 2012-08-13 10:55:13 UTC
Created glibc tracking bugs for this issue

Affects: fedora-all [bug 847718]

Comment 4 Jan Lieskovsky 2012-08-13 10:56:29 UTC
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-18 01:29:57 UTC
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 13:09:40 UTC
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 13:09:51 UTC
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 22:59:44 UTC
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 16:51:57 UTC
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 23:50:54 UTC
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 17:11:18 UTC
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