Bug 1622674 - glibc: Fix memory overread when regex pattern contains NUL byte
Summary: glibc: Fix memory overread when regex pattern contains NUL byte
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 29
Hardware: All
OS: All
high
medium
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1622678
TreeView+ depends on / blocked
 
Reported: 2018-08-27 17:48 UTC by Florian Weimer
Modified: 2019-11-05 14:43 UTC (History)
9 users (show)

Fixed In Version: glibc-2.28.9000-2.fc30 glibc-2.28-8.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1622678 (view as bug list)
Environment:
Last Closed: 2019-11-05 14:43:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 23578 0 None None None 2018-08-29 06:48:30 UTC

Description Florian Weimer 2018-08-27 17:48:48 UTC
Quoting Assaf Gordon in <https://lists.gnu.org/r/bug-gnulib/2018-08/msg00142.html>:

“
1. The input regex contains multibyte character with
   different uppper/lower case representation.
2. The input regex also contains a NUL character.
”

Upstream commit:

commit bc680b336971305cb39896b30d72dc7101b62242
Author: Paul Eggert <eggert.edu>
Date:   Sat Aug 25 20:34:34 2018 -0700

    regex: fix uninitialized memory access
    
    I introduced this bug into gnulib in commit
    8335a4d6c7b4448cd0bcb6d0bebf1d456bcfdb17 dated 2006-04-10;
    eventually it was merged into glibc.  The bug was found by
    project-repo <bugs> and reported here:
    https://lists.gnu.org/r/sed-devel/2018-08/msg00017.html
    Diagnosis and draft fix reported by Assaf Gordon here:
    https://lists.gnu.org/r/bug-gnulib/2018-08/msg00071.html
    https://lists.gnu.org/r/bug-gnulib/2018-08/msg00142.html
    * posix/regex_internal.c (build_wcs_upper_buffer):
    Fix bug when mbrtowc returns 0.

Comment 1 Florian Weimer 2018-08-28 09:39:28 UTC
Note that there are upstream reports that this bug does not affect glibc, only the code in gnulib.  I do not think this is true.

Comment 2 Fedora Update System 2018-08-29 11:58:49 UTC
glibc-2.28-8.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7baa4e2d9d

Comment 3 Fedora Update System 2018-08-29 19:07:38 UTC
glibc-2.28-8.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7baa4e2d9d

Comment 4 Fedora Update System 2018-08-29 23:14:22 UTC
glibc-2.28-9.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-7baa4e2d9d

Comment 5 Fedora Update System 2018-09-21 05:22:46 UTC
glibc-2.28-9.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Ben Cotton 2019-10-31 19:09:27 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


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