This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix crashes on invalid input in IBM gconv modules [BZ #17325]
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Roland McGrath <roland at hack dot frob dot com>, Andreas Schwab <schwab at linux-m68k dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, azanella at linux dot vnet dot ibm dot com
- Date: Wed, 03 Sep 2014 12:37:49 -0400
- Subject: Re: [PATCH] Fix crashes on invalid input in IBM gconv modules [BZ #17325]
- Authentication-results: sourceware.org; auth=none
- References: <54006E57 dot 8030800 at redhat dot com> <87y4u7o1yr dot fsf at igel dot home> <20140829215448 dot 6C4972C3A30 at topped-with-meat dot com> <5401A6C1 dot 7090807 at redhat dot com>
On 08/30/2014 06:26 AM, Florian Weimer wrote:
> On 08/29/2014 11:54 PM, Roland McGrath wrote:
>>> Florian Weimer <fweimer@redhat.com> writes:
>>>
>>>> + if (__builtin_expect (rp2->start == 0xffff, 0) \
>>>
>>> Please use either this
>>>
>>>> + if (__builtin_expect (ch == 0xffff, 0) \
>>>
>>> or this consistently.
>>
>> Use neither. Use __glibc_{un,}likely consistently.
>
> I would like to do this in a future cleanup across all gconv modules,
> after the 2.20 release. For this patch, I went with the existing
> style in the changed files. This also simplifies backporting.
At this late in the 2.20 freeze the CVE fix should be the minimal
change possible that fixes the bug for 2.20.
You get an ACK from me to use __builtin_expect for now, since it
also simplified backports of this security bug fix by minimally
touching code.
I am however holding you responsible to cleanup the uses after
2.20 branches >:-)
Cheers,
Carlos.