This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15322] New: increment_counter fails to check the status of step->init_fct, unlike gen_steps
- From: "aoliva at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 29 Mar 2013 14:02:06 +0000
- Subject: [Bug libc/15322] New: increment_counter fails to check the status of step->init_fct, unlike gen_steps
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15322
Bug #: 15322
Summary: increment_counter fails to check the status of
step->init_fct, unlike gen_steps
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: aoliva@sourceware.org
CC: drepper.fsp@gmail.com
Classification: Unclassified
I found this while auditing iconv/gconv_db.c for thread safety.
gen_steps runs init_fct for a step and checks the return status. If init
failed, it runs the end_fct before releasing the step.
increment_counter, OTOH, runs init_fct without checking its return status.
This my turn out to be a problem if the loaded module for the step was unloaded
and loaded back in with different code, a possibiliy increment_counter already
accounts in comments before updating the function pointers: if the new init
code is faulty, or if it introduces new requirements that are not met so that
it fails, we end up with an inconsistent, improperly initialized conversion
step, instead of reporting an error back to the caller.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.