Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 647802 (CVE-2018-5268, CVE-2018-5269)

Summary: <media-libs/opencv-3.4.1: multiple vulnerabilites (CVE-2018-{5268,5269})
Product: Gentoo Security Reporter: GLSAMaker/CVETool Bot <glsamaker>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED FIXED    
Severity: minor CC: amynka
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=711284
https://github.com/gentoo/gentoo/pull/15920
Whiteboard: B3 [noglsa cve]
Package list:
Runtime testing required: ---

Description GLSAMaker/CVETool Bot gentoo-dev 2018-02-16 00:50:35 UTC
CVE-2018-5269 (https://nvd.nist.gov/vuln/detail/CVE-2018-5269):
  In OpenCV 3.3.1, an assertion failure happens in cv::RBaseStream::setPos in
  modules/imgcodecs/src/bitstrm.cpp because of an incorrect integer cast.

CVE-2018-5268 (https://nvd.nist.gov/vuln/detail/CVE-2018-5268):
  In OpenCV 3.3.1, a heap-based buffer overflow happens in
  cv::Jpeg2KDecoder::readComponent8u in
  modules/imgcodecs/src/grfmt_jpeg2000.cpp when parsing a crafted image file.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-28 21:44:07 UTC
(In reply to Amy Liffey from comment #1)
>  - Integrated in opencv 3.4.1 [1] [2]
>  - Not in 2.4.13 -> incoming patch
> 
> [1]
> https://github.com/opencv/opencv/blob/3.4.1/modules/imgcodecs/src/bitstrm.
> cpp#L185
> [2]
> https://github.com/opencv/opencv/blob/3.4.1/modules/imgcodecs/src/
> grfmt_jpeg2000.cpp#L80

So does 2.4.14 need a fix, and does it have one? Thanks!
Comment 3 Larry the Git Cow gentoo-dev 2020-06-25 17:08:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d85c6578126c3592dbae8a8fc6ff6b27995e34

commit b9d85c6578126c3592dbae8a8fc6ff6b27995e34
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-06-25 07:53:25 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-06-25 17:07:43 +0000

    media-libs/opencv: Drop vulnerable 2.4.13-r4
    
    Bug: https://bugs.gentoo.org/647802
    Bug: https://bugs.gentoo.org/729504
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 media-libs/opencv/Manifest                         |   1 -
 .../opencv/files/opencv-2.3.1a-libav-0.7.patch     |  10 -
 .../opencv/files/opencv-2.4.13-gcc-6.0.patch       |  23 -
 .../opencv-2.4.13-imgcodecs-refactoring.patch      | 580 ---------------------
 media-libs/opencv/files/opencv-2.4.2-cflags.patch  |  21 -
 media-libs/opencv/files/opencv-2.4.3-gcc47.patch   |  22 -
 .../opencv/files/opencv-2.4.8-javamagic.patch      |  32 --
 .../files/opencv-2.4.9-cuda-pkg-config.patch       |  12 -
 media-libs/opencv/opencv-2.4.13-r4.ebuild          | 230 --------
 9 files changed, 931 deletions(-)