Bug 1631719 - glibc: Fix bug in generic strstr with large needles
Summary: glibc: Fix bug in generic strstr with large needles
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1631722
TreeView+ depends on / blocked
 
Reported: 2018-09-21 11:23 UTC by Florian Weimer
Modified: 2018-11-07 08:11 UTC (History)
10 users (show)

Fixed In Version: glibc-2.28-15.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1631722 (view as bug list)
Environment:
Last Closed: 2018-11-07 08:11:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 23637 0 None None None 2018-09-21 11:23:04 UTC

Description Florian Weimer 2018-09-21 11:23:04 UTC
We need to backport this commit:

commit 83a552b0bb9fc2a5e80a0ab3723c0a80ce1db9f2
Author: Wilco Dijkstra <wdijkstr>
Date:   Wed Sep 19 16:50:18 2018 +0100

    Fix strstr bug with huge needles (bug 23637)
    
    The generic strstr in GLIBC 2.28 fails to match huge needles.  The optimized
    AVAILABLE macro reads ahead a large fixed amount to reduce the overhead of
    repeatedly checking for the end of the string.  However if the needle length
    is larger than this, two_way_long_needle may confuse this as meaning the end
    of the string and return NULL.  This is fixed by adding the needle length to
    the amount to read ahead.
    
            [BZ #23637]
            * string/test-strstr.c (pr23637): New function.
            (test_main): Add tests with longer needles.
            * string/strcasestr.c (AVAILABLE): Fix readahead distance.
            * string/strstr.c (AVAILABLE): Likewise.

This change comes with a test case.

Comment 1 Fedora Update System 2018-11-03 07:00:53 UTC
glibc-2.28-17.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0e5874aba9

Comment 2 Fedora Update System 2018-11-04 06:38:17 UTC
glibc-2.28-17.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0e5874aba9

Comment 3 Fedora Update System 2018-11-07 02:40:36 UTC
glibc-2.28-17.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.