Bug 1287695 - (CVE-2015-8393) CVE-2015-8393 pcre: pcregrep -q is not always quiet (8.38/28)
CVE-2015-8393 pcre: pcregrep -q is not always quiet (8.38/28)
Status: CLOSED NOTABUG
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Red Hat Product Security
impact=none,public=20151123,reported=...
: Security
Depends On: 1287697 1287698 1287699 1287700
Blocks: 1287727
  Show dependency treegraph
 
Reported: 2015-12-02 09:05 EST by Adam Mariš
Modified: 2017-08-02 23:08 EDT (History)
17 users (show)

See Also:
Fixed In Version: pcre 8.38
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 08:58:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2015-12-02 09:05:21 EST
It was discovered that pcregrep in PCRE before 8.38 mishandles the -q option for binary files or when used with -c or -l options, incorrectly writing output to stdout, which might allow remote attackers to obtain sensitive information via a crafted file.
Comment 1 Adam Mariš 2015-12-02 09:06:08 EST
Created pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287697]
Comment 2 Adam Mariš 2015-12-02 09:06:16 EST
Created glib2 tracking bugs for this issue:

Affects: fedora-all [bug 1287699]
Comment 3 Adam Mariš 2015-12-02 09:06:25 EST
Created mingw-pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287698]
Affects: epel-7 [bug 1287700]
Comment 4 Adam Mariš 2015-12-02 10:24:39 EST
Corresponds to item 28 in http://vcs.pcre.org/pcre/code/trunk/ChangeLog?view=markup
Comment 5 Petr Pisar 2015-12-02 11:11:26 EST
Fixed in upstream with:

commit 8dda766e48f3bd16df6d8af870e9df4551b6216d
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Wed Aug 5 17:43:19 2015 +0000

    Make pcregrep -q override -l and -c for compatibility with other greps.
    
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1586 2f5784b3-3f2a-0410-8824-
cb99058d5e15
Comment 6 Fedora Update System 2016-01-04 14:55:05 EST
pcre-8.38-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 7 Tomas Hoger 2016-02-18 08:47:03 EST
(In reply to Petr Pisar from comment #5)
> Fixed in upstream with:
> 
> commit 8dda766e48f3bd16df6d8af870e9df4551b6216d
> Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
> Date:   Wed Aug 5 17:43:19 2015 +0000
> 
> Make pcregrep -q override -l and -c for compatibility with other greps.

Upstream commit link:

http://vcs.pcre.org/pcre?view=revision&revision=1586
Comment 8 Tomas Hoger 2016-02-18 08:58:23 EST
Upstream fix corrects two problems:

- When pcregrep is run with both -q (--quiet) and one of -c (--count) and -l (--files-with-matches) it still generates output unlike other grep implementations.  As these options are conflicting, this may be considered bug, but not a security issue.

- When pcregrep is rung with -q and the file being grepped is binary, it prints a message as: "Binary file filname matches".  Reportedly, this is an information leak issue (where leaked information is the name of file being grepped).  Leak can only happen in very specific circumstances, and I don't think this is really worth calling security given the minimal impact.

This second problem was only introduced in version 8.31, when pcregrep got support for binary files:

http://vcs.pcre.org/pcre?view=revision&revision=947

This bug also does not affect various packages that embed PCRE library, as it's not in the library itself, but in the pcregrep tool.

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