From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14444 invoked by alias); 29 Aug 2014 08:40:48 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 14396 invoked by uid 48); 29 Aug 2014 08:40:44 -0000 From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug localedata/17325] iconv from ccsid 937 to utf-8 access invalid memory Date: Fri, 29 Aug 2014 08:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: localedata X-Bugzilla-Version: 2.20 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security+ X-Bugzilla-Changed-Fields: cc flagtypes.name Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00149.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17325 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fweimer at redhat dot com Flags| |security+ --- Comment #1 from Florian Weimer --- 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.