Bug 837577 (CVE-2012-3401)
Summary: | CVE-2012-3401 libtiff (tiff2pdf): Heap-based buffer overflow due to improper initialization of T2P context struct pointer | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] Security Response | Reporter: | Jan Lieskovsky <jlieskov> | ||||
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | unspecified | CC: | henri, mancha1, security-response-team, tgl | ||||
Target Milestone: | --- | Keywords: | Security | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-12-21 08:39:43 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 841736, 880907, 885308, 885309, 885310, 885311 | ||||||
Bug Blocks: | 837581 | ||||||
Attachments: |
|
Description
Jan Lieskovsky
2012-07-04 10:01:43 UTC
I have pushed the patches attached to this BZ into upstream libtiff CVS. They don't seem to have a cvsweb server, but instructions for anonymous CVS access are at http://www.remotesensing.org/libtiff/ This is now public via: http://seclists.org/oss-sec/2012/q3/88 Hi. Do we have a similar situation at tools/tiff2pdf.c:3184? (In reply to comment #16) > This is now public via: > > http://seclists.org/oss-sec/2012/q3/88 The above link is wrong, correct link is: http://seclists.org/oss-sec/2012/q3/101 (In reply to comment #18) > Hi. Do we have a similar situation at tools/tiff2pdf.c:3184? This question is pretty content-free, since I have no idea what version of the file you're looking at. How about quoting code instead of expecting me to guess? (In reply to comment #21) > This question is pretty content-free, since I have no idea what version of > the file you're looking at. How about quoting code instead of expecting me > to guess? Taking my cues from your patch, I looked at v4.0.2. Below is the extract from t2p_process_ojpeg_tables() which I referred to: 3159 t2p->t2p_error = T2P_ERR_ERROR; 3160 return(0); 3161 } 3162 if(!TIFFGetField(input, TIFFTAG_JPEGPOINTTRANSFORM, &pt)){ 3163 TIFFError(TIFF2PDF_MODULE, 3164 "Missing JPEGPointTransform field in OJPEG image %s", 3165 TIFFFileName(input)); 3166 t2p->t2p_error = T2P_ERR_ERROR; 3167 return(0); 3168 } 3169 } 3170 if(!TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, &v_samp)){ 3171 h_samp=1; 3172 v_samp=1; 3173 } 3174 if(t2p->pdf_ojpegdata != NULL){ 3175 _TIFFfree(t2p->pdf_ojpegdata); 3176 t2p->pdf_ojpegdata=NULL; 3177 } 3178 t2p->pdf_ojpegdata = _TIFFmalloc(2048); 3179 if(t2p->pdf_ojpegdata == NULL){ 3180 TIFFError(TIFF2PDF_MODULE, 3181 "Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s", 3182 2048, 3183 TIFFFileName(input)); 3184 return(0); 3185 } Yeah, you're right, that should set t2p_error --- and looking through the file, I found a similar oversight in t2p_write_pdf(). These cases do not have any security content though, because AFAICS nothing will crash if pdf_ojpegdata (or pdf_xrefoffsets in the other place) is left null. You might get a bogus additional error message, and/or failure to exit(1) as desired, but no worse. I've pushed those fixes into upstream CVS, so they will be in the next releases, but I don't think they should be considered part of the CVE issue. Created libtiff tracking bugs for this issue Affects: fedora-all [bug 841736] libtiff-3.9.6-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. libtiff-3.9.6-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. This issue affects the versions of the libtiff package, as shipped with Red Hat Enterprise Linux 5 and 6. Statement: The Red Hat Security Response Team has rated this issue as having moderate security impact. A future libtiff package update may address this issue in Red Hat Enterprise Linux 5 and 6. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/. Acknowledgements: This issue was discovered by Huzaifa Sidhpurwala of the Red Hat Security Response Team. Created libtiff tracking bugs for this issue Affects: fedora-all [bug 880907] This issue has been addressed in following products: Red Hat Enterprise Linux 5 Red Hat Enterprise Linux 6 Via RHSA-2012:1590 https://rhn.redhat.com/errata/RHSA-2012-1590.html libtiff-3.9.7-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. libtiff-3.9.7-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. libtiff-4.0.3-2.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |