Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 914282 Details for
Bug 1102353
CVE-2014-0475 glibc: directory traversal in LC_* locale handling
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
0001-setlocale-Use-the-heap-for-the-copy-of-the-locale-ar.patch
0001-setlocale-Use-the-heap-for-the-copy-of-the-locale-ar.patch (text/plain), 2.25 KB, created by
Florian Weimer
on 2014-07-02 19:41:55 UTC
(
hide
)
Description:
0001-setlocale-Use-the-heap-for-the-copy-of-the-locale-ar.patch
Filename:
MIME Type:
Creator:
Florian Weimer
Created:
2014-07-02 19:41:55 UTC
Size:
2.25 KB
patch
obsolete
>From c9775f8d4de7383ec9fe0121165227ff56a5def5 Mon Sep 17 00:00:00 2001 >From: Florian Weimer <fweimer@redhat.com> >Date: Wed, 28 May 2014 14:41:52 +0200 >Subject: [PATCH 1/3] setlocale: Use the heap for the copy of the locale > argument > >--- > ChangeLog | 5 +++++ > locale/setlocale.c | 14 ++++++++++++-- > 2 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/ChangeLog b/ChangeLog >index a1e44b1..457b821 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,8 @@ >+2014-07-02 Florian Weimer <fweimer@redhat.com> >+ >+ * locale/setlocale.c (setlocale): Use strdup for allocating >+ composite name copy. >+ > 2014-07-01 Stefan Liebler <stli@linux.vnet.ibm.com> > > * sysdeps/s390/fpu/libm-test-ulps: Regenerate. >diff --git a/locale/setlocale.c b/locale/setlocale.c >index 9458468..6455b8b 100644 >--- a/locale/setlocale.c >+++ b/locale/setlocale.c >@@ -272,6 +272,8 @@ setlocale (int category, const char *locale) > of entries of the form `CATEGORY=VALUE'. */ > const char *newnames[__LC_LAST]; > struct __locale_data *newdata[__LC_LAST]; >+ /* Copy of the locale argument, for in-place splitting. */ >+ char *locale_copy = NULL; > > /* Set all name pointers to the argument name. */ > for (category = 0; category < __LC_LAST; ++category) >@@ -281,7 +283,13 @@ setlocale (int category, const char *locale) > if (__glibc_unlikely (strchr (locale, ';') != NULL)) > { > /* This is a composite name. Make a copy and split it up. */ >- char *np = strdupa (locale); >+ locale_copy = strdup (locale); >+ if (__glibc_unlikely (locale_copy == NULL)) >+ { >+ __libc_rwlock_unlock (__libc_setlocale_lock); >+ return NULL; >+ } >+ char *np = locale_copy; > char *cp; > int cnt; > >@@ -299,6 +307,7 @@ setlocale (int category, const char *locale) > { > error_return: > __libc_rwlock_unlock (__libc_setlocale_lock); >+ free (locale_copy); > > /* Bogus category name. */ > ERROR_RETURN; >@@ -391,8 +400,9 @@ setlocale (int category, const char *locale) > /* Critical section left. */ > __libc_rwlock_unlock (__libc_setlocale_lock); > >- /* Free the resources (the locale path variable). */ >+ /* Free the resources. */ > free (locale_path); >+ free (locale_copy); > > return composite; > } >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1102353
: 914282 |
914283
|
914284