Summary: | Two security issues in strcoll() function | ||
---|---|---|---|
Product: | glibc | Reporter: | Shaun Colley <shaun.colley> |
Component: | libc | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | drepper.fsp, fweimer |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.17 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Shaun Colley
2012-09-06 16:18:35 UTC
I've pasted the more complete fragment of code for the unbounded alloca() issue below. /* We need this a few times. */ s1len = STRLEN (s1); s2len = STRLEN (s2); [ … ] Please note that the localedef programs makes sure that `position' is not used at the first level. */ if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1))) // [1] if arithmetic is greater 65536, use malloc() instead of alloca() { idx1arr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1)); idx2arr = &idx1arr[s1len]; rule1arr = (unsigned char *) &idx2arr[s2len]; rule2arr = &rule1arr[s1len]; if (idx1arr == NULL) /* No memory. Well, go with the stack then. XXX Once this implementation is stable we will handle this differently. Instead of precomputing the indeces we will do this in time. This means, though, that this happens for every pass again. */ goto try_stack; use_malloc = 1; } else { try_stack: idx1arr = (int32_t *) alloca (s1len * sizeof (int32_t)); idx2arr = (int32_t *) alloca (s2len * sizeof (int32_t)); rule1arr = (unsigned char *) alloca (s1len); rule2arr = (unsigned char *) alloca (s2len); } Duplicate of 14547, please add the extra details there. *** This bug has been marked as a duplicate of bug 14547 *** This was assigned CVE-2012-4412 and CVE-2012-4424. See bug 14547 for details. Reusing this bug as the holder for one of the CVE aliases. |