Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601408 (CVE-2016-4331) - <sci-libs/hdf5-1.8.18: H5Z_NBIT heap buffer overflow (CVE-2016-4331)
Summary: <sci-libs/hdf5-1.8.18: H5Z_NBIT heap buffer overflow (CVE-2016-4331)
Status: RESOLVED FIXED
Alias: CVE-2016-4331
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard: B2 [glsa cve]
Keywords:
Depends on: CVE-2016-4330
Blocks:
  Show dependency tree
 
Reported: 2016-12-01 23:59 UTC by Ian Zimmerman
Modified: 2017-01-02 14:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
hdf5-1.8.17-CVE-2016-4331.patch (hdf5-1.8.17-CVE-2016-4331.patch,9.87 KB, patch)
2016-12-03 08:34 UTC, Chris White
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Zimmerman 2016-12-01 23:59:38 UTC
According to the RedHat summary:

The vulnerability exists when the library is decoding data out of a dataset encoded with the H5Z_NBIT decoding. When calculating the precision that a BCD number is encoded as, the library will fail to ensure that the precision is within the bounds of the size. Due to this, the library will calculate an index outside the bounds of the space allocated for the BCD number. Whilst decoding this data, the library will then write outside the bounds of the buffer leading to a heap-based buffer overflow. This can lead to code execution under the context of the application using the library.

Upstream fixes:
https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/commits/e1c4ec3d541eecda78b3afcb1a0fa071c4b52afa
https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/commits/43ec23616697ce0ea3f99e40900fec55fe9107ef


Reproducible: Always
Comment 1 GLSAMaker/CVETool Bot gentoo-dev 2016-12-02 08:34:42 UTC
CVE-2016-4331 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2016-4331):
  When decoding data out of a dataset encoded with the H5Z_NBIT decoding, the
  HDF5 1.8.16 library will fail to ensure that the precision is within the
  bounds of the size leading to arbitrary code execution.
Comment 2 Chris White 2016-12-03 08:34:22 UTC
Created attachment 454952 [details, diff]
hdf5-1.8.17-CVE-2016-4331.patch

* This bug affects 1.8.17 as well, and is release fixed with 1.8.18 which is not in the tree
* The commits in the URL are incomplete fixes as they reference functions not defined in the patch
* Attached is a patch generated by a diff of the file in question between 1.8.17 and 1.8.18. 
* The code differences between 1.8.17 and 1.8.14 (current stable) are enough to where I can't reliably backport
* With that in mind this fix should be combined with bug #601420 and 1.8.17 stablereq'ed
Comment 3 GLSAMaker/CVETool Bot gentoo-dev 2017-01-02 14:55:26 UTC
This issue was resolved and addressed in
 GLSA 201701-13 at https://security.gentoo.org/glsa/201701-13
by GLSA coordinator Thomas Deutschmann (whissi).