This is the mail archive of the libc-locales@sourceware.org mailing list for the GNU libc locales project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/17325] iconv from ccsid 937 to utf-8 access invalid memory


https://sourceware.org/bugzilla/show_bug.cgi?id=17325

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security+

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
This has application impact and has to be treated as a security bug.

Do you know what actually happens?  I think it's this: rp2 points to the last
range in the _idx array, which corresponds to the ch value of 0xffff.  This is
intended as a sentinel, but the code proceeds as if it is a real table entry. 
Do you agree?  If this analysis is correct, it means that the only possible
out-of-bound indexing happens with ch == 0xffff.

I think the patch is incorrect because sizeof doesn't give the array length in
elements.  It may work by accident, but it's probably better to check for
0xffff explicitly, or rp2->idx being zero.

Other conversion modules are affected as well (e.g., ibm1364).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]