Bug 1189325 (CVE-2020-21683)

Summary: VUL-0: CVE-2020-21683: transfig: A global buffer overflow in the shade_or_tint_name_after_declare_color in genpstricks.c allows attackers to cause a denial of service (DOS) via converting a xfig file into pstricks format
Product: [Novell Products] SUSE Security Incidents Reporter: Gianluca Gabrielli <gianluca.gabrielli>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Major    
Priority: P3 - Medium CC: gabriele.sonnu, gianluca.gabrielli, rfrohl, smash_bz, werner
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/306184/
Whiteboard: CVSSv3.1:SUSE:CVE-2020-21683:7.5:(AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Gianluca Gabrielli 2021-08-11 11:33:46 UTC
A global buffer overflow in the shade_or_tint_name_after_declare_color in
genpstricks.c of fig2dev 3.2.7b allows attackers to cause a denial of service
(DOS) via converting a xfig file into pstricks format.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-21683
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-21683
https://sourceforge.net/p/mcj/tickets/77/
Comment 1 Gianluca Gabrielli 2021-08-11 11:34:29 UTC
Affected package:
 - SUSE:SLE-12:Update/transfig     3.2.5e

Upstream patch [0].

[0] https://sourceforge.net/p/mcj/fig2dev/ci/639c36010a120e97a6e82e7cd57cbf9dbf4b64f1/
Comment 2 Dr. Werner Fink 2021-08-11 11:36:20 UTC
(In reply to Gianluca Gabrielli from comment #1)
> Affected package:
>  - SUSE:SLE-12:Update/transfig     3.2.5e
> 
> Upstream patch [0].
> 
> [0]
> https://sourceforge.net/p/mcj/fig2dev/ci/
> 639c36010a120e97a6e82e7cd57cbf9dbf4b64f1/

Please double check as the version on SLE-12 should be 3.2.5e with the *latest* update
Comment 3 Robert Frohl 2021-08-11 11:48:29 UTC
(In reply to Dr. Werner Fink from comment #2)
> Please double check as the version on SLE-12 should be 3.2.5e with the
> *latest* update

That was not released as of yet, because we do not know how to satisfy the new dependency for texlive-epstopdf at the moment.
Comment 4 Dr. Werner Fink 2021-08-11 11:51:36 UTC
(In reply to Robert Frohl from comment #3)
> (In reply to Dr. Werner Fink from comment #2)
> > Please double check as the version on SLE-12 should be 3.2.5e with the
> > *latest* update
> 
> That was not released as of yet, because we do not know how to satisfy the
> new dependency for texlive-epstopdf at the moment.

Can I have the SR numbers for the SR I had done for SLE-11, SLE-12, and perhaps SLE-15 as I'm not able to list them with osc on internal build server
Comment 5 Robert Frohl 2021-08-11 12:05:49 UTC
(In reply to Dr. Werner Fink from comment #4)
> (In reply to Robert Frohl from comment #3)
> > (In reply to Dr. Werner Fink from comment #2)
> > > Please double check as the version on SLE-12 should be 3.2.5e with the
> > > *latest* update
> > 
> > That was not released as of yet, because we do not know how to satisfy the
> > new dependency for texlive-epstopdf at the moment.
> 
> Can I have the SR numbers for the SR I had done for SLE-11, SLE-12, and
> perhaps SLE-15 as I'm not able to list them with osc on internal build server

SLE11: 243579
SLE12: 243581
SLE15: 243621

SLE15 was released because there we had the package texlive-epstopdf in the channels already.
Comment 6 Dr. Werner Fink 2021-08-11 12:08:22 UTC
What I do not get is the fact that even for SUSE:SLE-12:GA I found the spec file texlive-epstopdf.spec in the tar ball texlive-specs.tar.xz and this will be build with the meta spec file texlive-specs-e.spec ...
Could it be that someone has decided that texlive-epstopdf is not part of SLE-12?
Comment 7 Robert Frohl 2021-08-11 12:10:30 UTC
(In reply to Dr. Werner Fink from comment #6)
> What I do not get is the fact that even for SUSE:SLE-12:GA I found the spec
> file texlive-epstopdf.spec in the tar ball texlive-specs.tar.xz and this
> will be build with the meta spec file texlive-specs-e.spec ...
> Could it be that someone has decided that texlive-epstopdf is not part of
> SLE-12?

We need a decision where to add the rpm to. If I remember correctly the rpm is build but not shipped to customers and that is ECO territory.
Comment 8 Dr. Werner Fink 2021-08-11 12:10:51 UTC
And the same problem with texlive-german which provides tex(german.sty)

xfig/transfig> isc cat SUSE:SLE-12:GA texlive-specs-e texlive-specs.tar.xz | \
  tar OxfJ - texlive-specs/texlive-german.spec | grep Provides
Provides: tex(german.sty)
Provides: tex(ngerman.sty)
Provides: locale(texlive-german-doc:de;de;de)
Comment 9 Robert Frohl 2021-08-11 12:12:32 UTC
(In reply to Robert Frohl from comment #7)
> We need a decision where to add the rpm to. If I remember correctly the rpm
> is build but not shipped to customers and that is ECO territory.

Thats for SLE12, I think there was a more complex problem for SLE11. Which I do not remember from the top of my head atm.
Comment 10 Dr. Werner Fink 2021-08-11 12:15:02 UTC
(In reply to Robert Frohl from comment #7)
> (In reply to Dr. Werner Fink from comment #6)
> > What I do not get is the fact that even for SUSE:SLE-12:GA I found the spec
> > file texlive-epstopdf.spec in the tar ball texlive-specs.tar.xz and this
> > will be build with the meta spec file texlive-specs-e.spec ...
> > Could it be that someone has decided that texlive-epstopdf is not part of
> > SLE-12?
> 
> We need a decision where to add the rpm to. If I remember correctly the rpm
> is build but not shipped to customers and that is ECO territory.

Ahh ... breaking TeXLive by skipping any packages was never permitted by me nor had I ever been asked.
Comment 11 Dr. Werner Fink 2021-08-11 12:49:59 UTC
See SR#248162 which should replace SR#243581 on SLE-12 ... this version simply does not build the docs for fig2mpdf (similar as not done on the older transfig packages on SLE-12 ... hence it was never detected that major TeXLive packages are missed on SLE-12)
Comment 12 Dr. Werner Fink 2021-08-12 10:23:20 UTC
Now what is with SR#248162 and SR#243579 ... when will those reach SLE-12 respectively SLE-11?
Comment 13 Dr. Werner Fink 2021-08-16 07:03:58 UTC
Ping ... any news about the latest SR of SLE-11 and SLE-12 and are those SR vulnerable for CVE-2020-21680 of bsc#1189343 and CVE-2020-21681 of bsc#1189345
Comment 14 Robert Frohl 2021-08-16 07:17:00 UTC
(In reply to Dr. Werner Fink from comment #13)
> Ping ... any news about the latest SR of SLE-11 and SLE-12 and are those SR
> vulnerable for CVE-2020-21680 of bsc#1189343 and CVE-2020-21681 of
> bsc#1189345

The SR does not seem to improve the situation, I get the same problem after the rebuild: 
> nothing provides texlive-epstopdf needed by transfig-3.2.8a-2.13.1.x86_64

That is the same problem as before, the UM would still need to check if this can be worked around.
Comment 15 Dr. Werner Fink 2021-08-16 08:00:24 UTC
(In reply to Robert Frohl from comment #14)
> (In reply to Dr. Werner Fink from comment #13)
> > Ping ... any news about the latest SR of SLE-11 and SLE-12 and are those SR
> > vulnerable for CVE-2020-21680 of bsc#1189343 and CVE-2020-21681 of
> > bsc#1189345
> 
> The SR does not seem to improve the situation, I get the same problem after
> the rebuild: 
> > nothing provides texlive-epstopdf needed by transfig-3.2.8a-2.13.1.x86_64
> 
> That is the same problem as before, the UM would still need to check if this
> can be worked around.

Please give SR#248377 a try as this does a hard skip of the requirement of texlive-epstopdf ... I really wonder how many customers do use transfig without texlive-epstopdf
Comment 16 Robert Frohl 2021-08-18 08:21:52 UTC
(In reply to Dr. Werner Fink from comment #15)
> Please give SR#248377 a try as this does a hard skip of the requirement of
> texlive-epstopdf ... I really wonder how many customers do use transfig
> without texlive-epstopdf

The fix looks good in SLE12. The dependencies issues have been resolved. I will wait a bit for the cpio situation to resolve.
Comment 17 Robert Frohl 2021-08-18 10:46:38 UTC
(In reply to Dr. Werner Fink from comment #2)
> Please double check as the version on SLE-12 should be 3.2.5e with the
> *latest* update

as well up to 3.2.7b, will also note in S:M:20224
Comment 18 Dr. Werner Fink 2021-09-10 09:18:49 UTC
What are the status of my SRs for SLE-11 and SLE-12 with 3.2.8a
Comment 19 Robert Frohl 2021-09-13 09:23:17 UTC
(In reply to Dr. Werner Fink from comment #18)
> What are the status of my SRs for SLE-11 and SLE-12 with 3.2.8a

both are waiting for QA approvals
Comment 22 Swamp Workflow Management 2021-09-16 22:27:30 UTC
# maintenance_jira_update_notice
SUSE-SU-2021:3124-1: An update that solves 8 vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 1136882,1159130,1159293,1161698,1186329,1189325,1189343,1189345,1189346
CVE References: CVE-2019-19555,CVE-2019-19746,CVE-2019-19797,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-3561
JIRA References: 
Sources used:
SUSE OpenStack Cloud Crowbar 9 (src):    transfig-3.2.8a-2.17.1
SUSE OpenStack Cloud Crowbar 8 (src):    transfig-3.2.8a-2.17.1
SUSE OpenStack Cloud 9 (src):    transfig-3.2.8a-2.17.1
SUSE OpenStack Cloud 8 (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server for SAP 12-SP4 (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server for SAP 12-SP3 (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server 12-SP5 (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server 12-SP4-LTSS (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server 12-SP3-LTSS (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server 12-SP3-BCL (src):    transfig-3.2.8a-2.17.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    transfig-3.2.8a-2.17.1
HPE Helion Openstack 8 (src):    transfig-3.2.8a-2.17.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 23 OBSbugzilla Bot 2021-09-20 14:40:36 UTC
This is an autogenerated message for OBS integration:
This bug (1189325) was mentioned in
https://build.opensuse.org/request/show/920329 Backports:SLE-15-SP2 / transfig
https://build.opensuse.org/request/show/920330 Backports:SLE-15-SP3 / transfig
Comment 25 Swamp Workflow Management 2021-10-06 19:54:58 UTC
SUSE-SU-2021:14823-1: An update that solves 9 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1136882,1143650,1159130,1159293,1161698,1186329,1189325,1189343,1189345,1189346
CVE References: CVE-2019-14275,CVE-2019-19555,CVE-2019-19746,CVE-2019-19797,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-3561
JIRA References: 
Sources used:
SUSE Linux Enterprise Server 11-SP4-LTSS (src):    transfig-3.2.8a-1.160.13.1
SUSE Linux Enterprise Point of Sale 11-SP3 (src):    transfig-3.2.8a-1.160.13.1
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    transfig-3.2.8a-1.160.13.1
SUSE Linux Enterprise Debuginfo 11-SP3 (src):    transfig-3.2.8a-1.160.13.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 27 Swamp Workflow Management 2021-10-29 19:22:43 UTC
SUSE-SU-2021:3584-1: An update that fixes 12 vulnerabilities is now available.

Category: security (important)
Bug References: 1189325,1189343,1189345,1189346,1190607,1190611,1190612,1190615,1190616,1190617,1190618,1192019
CVE References: CVE-2020-21529,CVE-2020-21530,CVE-2020-21531,CVE-2020-21532,CVE-2020-21533,CVE-2020-21534,CVE-2020-21535,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-32280
JIRA References: 
Sources used:
SUSE Linux Enterprise Workstation Extension 15-SP3 (src):    transfig-3.2.8b-4.15.1
SUSE Linux Enterprise Workstation Extension 15-SP2 (src):    transfig-3.2.8b-4.15.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 28 Swamp Workflow Management 2021-10-29 19:24:54 UTC
openSUSE-SU-2021:3584-1: An update that fixes 12 vulnerabilities is now available.

Category: security (important)
Bug References: 1189325,1189343,1189345,1189346,1190607,1190611,1190612,1190615,1190616,1190617,1190618,1192019
CVE References: CVE-2020-21529,CVE-2020-21530,CVE-2020-21531,CVE-2020-21532,CVE-2020-21533,CVE-2020-21534,CVE-2020-21535,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-32280
JIRA References: 
Sources used:
openSUSE Leap 15.3 (src):    transfig-3.2.8b-4.15.1
Comment 29 Swamp Workflow Management 2021-11-02 17:21:26 UTC
openSUSE-SU-2021:1439-1: An update that fixes 12 vulnerabilities is now available.

Category: security (important)
Bug References: 1189325,1189343,1189345,1189346,1190607,1190611,1190612,1190615,1190616,1190617,1190618,1192019
CVE References: CVE-2020-21529,CVE-2020-21530,CVE-2020-21531,CVE-2020-21532,CVE-2020-21533,CVE-2020-21534,CVE-2020-21535,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-32280
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    transfig-3.2.8b-lp152.6.9.1
Comment 30 Swamp Workflow Management 2021-11-07 23:16:11 UTC
openSUSE-SU-2021:1458-1: An update that fixes 12 vulnerabilities is now available.

Category: security (important)
Bug References: 1189325,1189343,1189345,1189346,1190607,1190611,1190612,1190615,1190616,1190617,1190618,1192019
CVE References: CVE-2020-21529,CVE-2020-21530,CVE-2020-21531,CVE-2020-21532,CVE-2020-21533,CVE-2020-21534,CVE-2020-21535,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-32280
JIRA References: 
Sources used:
openSUSE Backports SLE-15-SP2 (src):    transfig-3.2.8b-bp152.3.6.2
Comment 31 Swamp Workflow Management 2021-11-18 14:19:26 UTC
openSUSE-SU-2021:1481-1: An update that fixes 12 vulnerabilities is now available.

Category: security (important)
Bug References: 1189325,1189343,1189345,1189346,1190607,1190611,1190612,1190615,1190616,1190617,1190618,1192019
CVE References: CVE-2020-21529,CVE-2020-21530,CVE-2020-21531,CVE-2020-21532,CVE-2020-21533,CVE-2020-21534,CVE-2020-21535,CVE-2020-21680,CVE-2020-21681,CVE-2020-21682,CVE-2020-21683,CVE-2021-32280
JIRA References: 
Sources used:
openSUSE Backports SLE-15-SP3 (src):    transfig-3.2.8b-bp153.3.6.3
Comment 32 Gabriele Sonnu 2022-04-14 15:36:13 UTC
Done.