The implementations of streams for bz2 and php://output improperly implemented their readImpl functions, returning -1 consistently. This behavior caused some stream functions, such as streamgetline, to trigger an out-of-bounds read when operating on such malformed streams. The implementations were updated to return valid values consistently. This affects all supported versions of HHVM (3.30 and 3.27.4 and below).
[
{
"source": "https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994",
"target": {
"file": "hphp/runtime/base/output-file.cpp"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2019-3557-43cc3ee9",
"digest": {
"threshold": 0.9,
"line_hashes": [
"142108827713512514436185405057893135105",
"269656250916374553211667901320829428383",
"319612009202422336968135164533114029828",
"15002152957258456447109582021990837697"
]
},
"signature_type": "Line"
},
{
"source": "https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994",
"target": {
"function": "OutputFile::readImpl",
"file": "hphp/runtime/base/output-file.cpp"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2019-3557-55b6d914",
"digest": {
"length": 121.0,
"function_hash": "12047624258055674249961091365408552516"
},
"signature_type": "Function"
},
{
"source": "https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994",
"target": {
"file": "hphp/runtime/ext/bz2/bz2-file.cpp"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2019-3557-a05c634b",
"digest": {
"threshold": 0.9,
"line_hashes": [
"110901687410337669414477894623879298352",
"95572666697477733803261616521873614957",
"106358059622253155722317322929847808364",
"122347618177407082596295890497230634246"
]
},
"signature_type": "Line"
},
{
"source": "https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994",
"target": {
"function": "BZ2File::readImpl",
"file": "hphp/runtime/ext/bz2/bz2-file.cpp"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2019-3557-bb1a0814",
"digest": {
"length": 255.0,
"function_hash": "22265091904922056449492719171830689508"
},
"signature_type": "Function"
}
]