Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression test for #3168 (backport #3175) #3180

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added test/data/issue_ghsa_38h4_fx85_qcx7_poc.tiff
Binary file not shown.
22 changes: 22 additions & 0 deletions tests/bugfixes/github/test_issue_ghsa_38h4_fx85_qcx7.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, path


class TiffSubIfd_use_after_free(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/security/advisories/GHSA-38h4-fx85-qcx7
"""

url = "https://github.com/Exiv2/exiv2/security/advisories/GHSA-38h4-fx85-qcx7"

filename = path("$data_path/issue_ghsa_38h4_fx85_qcx7_poc.tiff")
commands = ["$exiv2 -q fi $filename"]
stdout = [""]
stderr = [
"""Exiv2 exception in fixiso action for file $filename:
$kerImageWriteFailed
"""
]
retval = [1]
1 change: 1 addition & 0 deletions tests/regression_tests/test_regression_allfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def get_valid_files(data_dir):
"issue_ghsa_mxw9_qx4c_6m8v_poc.jp2",
"issue_ghsa_hrw9_ggg3_3r4r_poc.jpg",
"issue_ghsa_g9xm_7538_mq8w_poc.mov",
"issue_ghsa_38h4_fx85_qcx7_poc.tiff",
"pocIssue283.jpg",
"poc_1522.jp2",
"xmpsdk.xmp",
Expand Down
1 change: 1 addition & 0 deletions tests/suite.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jpegparsetest: ${ENV:exiv2_path}/jpegparsetest
kerOffsetOutOfRange: Offset out of range
kerFailedToReadImageData: Failed to read image data
kerInputDataReadFailed: Failed to read input data
kerImageWriteFailed: Failed to write image
kerCorruptedMetadata: corrupted image metadata
kerInvalidMalloc: invalid memory allocation request
kerInvalidTypeValue: invalid type in tiff structure
Expand Down
Loading