Bugzilla – Bug 1187869
VUL-0: CVE-2021-3630: djvulibre: out-of-bounds write in DJVU:DjVuTXT:decode() in DjVuText.cpp
Last modified: 2024-07-23 09:00:44 UTC
An out-of-bounds write vulnerability was found in DjVuLibre in DJVU::DjVuTXT::decode() in DjVuText.cpp via a crafted djvu file which may lead to crash and segmentation fault. This flaw affects DjVuLibre versions prior to 3.5.28. Reference: https://sourceforge.net/p/djvu/bugs/302/ Upstream patch: https://sourceforge.net/p/djvu/djvulibre-git/ci/7b0ef20690e08f1fe124aebbf42f6310e2f40f81/ References: https://bugzilla.redhat.com/show_bug.cgi?id=1977427 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3630
Affected packages: - SUSE:SLE-11:Update/djvulibre 3.5.21 - SUSE:SLE-12:Update/djvulibre 3.5.25.3 - SUSE:SLE-15-SP2:Update/djvulibre 3.5.27 - SUSE:SLE-15:Update/djvulibre 3.5.27 Already patched: - openSUSE:Factory/djvulibre 3.5.28 Upstream patch [0]. [0] https://sourceforge.net/p/djvu/djvulibre-git/ci/7b0ef20690e08f1fe124aebbf42f6310e2f40f81/
Submitted for 15sp2,15,12,11/djvulibre.
SUSE-SU-2021:14761-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: SUSE Linux Enterprise Server 11-SP4-LTSS (src): djvulibre-3.5.21-3.15.1 SUSE Linux Enterprise Point of Sale 11-SP3 (src): djvulibre-3.5.21-3.15.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): djvulibre-3.5.21-3.15.1 SUSE Linux Enterprise Debuginfo 11-SP3 (src): djvulibre-3.5.21-3.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.
(In reply to Gianluca Gabrielli from comment #0) > An out-of-bounds write vulnerability was found in DjVuLibre in > DJVU::DjVuTXT::decode() in DjVuText.cpp via a crafted djvu file which may > lead to crash and segmentation fault. This flaw affects DjVuLibre versions > prior to 3.5.28. > > Reference: > https://sourceforge.net/p/djvu/bugs/302/ > > Upstream patch: > https://sourceforge.net/p/djvu/djvulibre-git/ci/ > 7b0ef20690e08f1fe124aebbf42f6310e2f40f81/ > > References: > https://bugzilla.redhat.com/show_bug.cgi?id=1977427 > http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3630 it seems the bug is not fixed on sle15sp2 and sle15sp3: s15sp3:~ # type djvutxt djvutxt is hashed (/usr/bin/djvutxt) s15sp3:~ # rpm -qf /usr/bin/djvutxt djvulibre-3.5.27-11.9.1.x86_64 s15sp3:~ # djvutxt DJVU\ DjVuTXT\ decode@DjVuText.cpp\ 348-20___SEGV_UNKNOW.cpp\ 348-20___SEGV_UNKNOW Segmentation fault (core dumped)
> > it seems the bug is not fixed on sle15sp2 and sle15sp3: > > s15sp3:~ # type djvutxt > djvutxt is hashed (/usr/bin/djvutxt) > > s15sp3:~ # rpm -qf /usr/bin/djvutxt > djvulibre-3.5.27-11.9.1.x86_64 > > s15sp3:~ # djvutxt DJVU\ DjVuTXT\ decode@DjVuText.cpp\ > 348-20___SEGV_UNKNOW.cpp\ 348-20___SEGV_UNKNOW > Segmentation fault (core dumped) reproducer: https://sourceforge.net/p/djvu/bugs/302/#ec3d
(In reply to Liu Shukui from comment #5) > (In reply to Gianluca Gabrielli from comment #0) > > An out-of-bounds write vulnerability was found in DjVuLibre in > > DJVU::DjVuTXT::decode() in DjVuText.cpp via a crafted djvu file which may > > lead to crash and segmentation fault. This flaw affects DjVuLibre versions > > prior to 3.5.28. > > > > Reference: > > https://sourceforge.net/p/djvu/bugs/302/ > > > > Upstream patch: > > https://sourceforge.net/p/djvu/djvulibre-git/ci/ > > 7b0ef20690e08f1fe124aebbf42f6310e2f40f81/ > > > > References: > > https://bugzilla.redhat.com/show_bug.cgi?id=1977427 > > http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3630 > > it seems the bug is not fixed on sle15sp2 and sle15sp3: > > s15sp3:~ # type djvutxt > djvutxt is hashed (/usr/bin/djvutxt) > > s15sp3:~ # rpm -qf /usr/bin/djvutxt > djvulibre-3.5.27-11.9.1.x86_64 > > s15sp3:~ # djvutxt DJVU\ DjVuTXT\ decode@DjVuText.cpp\ > 348-20___SEGV_UNKNOW.cpp\ 348-20___SEGV_UNKNOW > Segmentation fault (core dumped) is there any progress?
@Petr: could you have a look please ?
is there any progress?
(In reply to Gianluca Gabrielli from comment #11) > @Petr could you please share an update abut the progress of this submission? > We need to ship the patched package. Sure, now when I have after vacation, I can look at the issue.
P. S. you do not need to set needinfo on me when the bug is assigned to me.
Tumbleweed/djvulibre (3.5.28, plus several CVE fixes) $ gdb --args djvutxt poc [..] (gdb) bt #0 0x00007ffff7ef34cc in DJVU::DjVuTXT::decode (this=0x5555555fd340, gbs=...) at /usr/src/debug/djvulibre-3.5.28-0.x86_64/libdjvu/DjVuText.cpp:348 #1 0x00007ffff7ef3782 in DJVU::DjVuText::decode (this=0x5555555a62b0, gbs=...) at /usr/src/debug/djvulibre-3.5.28-0.x86_64/libdjvu/GSmartPointer.h:436 #2 0x00007ffff7f644df in ddjvu_document_get_pagetext (document=0x55555556e4c0, pageno=-6784, maxdetail=0x555555556049 "page") at /usr/src/debug/djvulibre-3.5.28-0.x86_64/libdjvu/GSmartPointer.h:436 #3 0x0000555555555ac2 in dopage (pageno=9) at /usr/src/debug/djvulibre-3.5.28-0.x86_64/tools/djvutxt.cpp:147 #4 0x0000555555555534 in parse_pagespec (dopage=0x555555555a70 <dopage(int)>, max_page=10, s=0x5555555560a4 "1-$") at /usr/src/debug/djvulibre-3.5.28-0.x86_64/tools/djvutxt.cpp:245 #5 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/djvulibre-3.5.28-0.x86_64/tools/djvutxt.cpp:359 (gdb) 15sp2/djvulibre (3.5.27, plus several CVE fixes, without CVE-2021-3630 fix) $ gdb --args djvutxt poc [...] (gdb) bt #0 DJVU::DjVuTXT::decode (this=0x5555556a97b0, gbs=...) at DjVuText.cpp:348 #1 0x00007ffff7afbb7e in DJVU::DjVuText::decode (this=0x5555556ac5f0, gbs=...) at DjVuText.cpp:705 #2 0x00007ffff7b7ba06 in ddjvu_document_get_pagetext (document=0x55555561d110, pageno=pageno@entry=8, maxdetail=maxdetail@entry=0x555555401e23 "page") at ddjvuapi.cpp:3623 #3 0x0000555555401732 in dopage (pageno=9) at djvutxt.cpp:147 #4 0x0000555555401c69 in parse_pagespec (s=0x555555401eab "1-$", max_page=10, dopage=dopage@entry=0x5555554016d0 <dopage(int)>) at djvutxt.cpp:245 #5 0x000055555540137a in main (argc=<optimized out>, argv=0x7fffffffe7e8) at djvutxt.cpp:359 (gdb) bt #0 DJVU::DjVuTXT::decode (this=0x5555556a97b0, gbs=...) at DjVuText.cpp:348 #1 0x00007ffff7afbb7e in DJVU::DjVuText::decode (this=0x5555556ac5f0, gbs=...) at DjVuText.cpp:705 #2 0x00007ffff7b7ba06 in ddjvu_document_get_pagetext (document=0x55555561d110, pageno=pageno@entry=8, maxdetail=maxdetail@entry=0x555555401e23 "page") at ddjvuapi.cpp:3623 #3 0x0000555555401732 in dopage (pageno=9) at djvutxt.cpp:147 #4 0x0000555555401c69 in parse_pagespec (s=0x555555401eab "1-$", max_page=10, dopage=dopage@entry=0x5555554016d0 <dopage(int)>) at djvutxt.cpp:245 #5 0x000055555540137a in main (argc=<optimized out>, argv=0x7fffffffe7e8) at djvutxt.cpp:359 (gdb) 15sp2/djvulibre (3.5.27, plus several CVE fixes, with CVE-2021-3630 fix) (gdb) bt #0 DJVU::DjVuTXT::decode (this=0x5555556c5a70, gbs=...) at DjVuText.cpp:348 #1 0x00007ffff7afbb7e in DJVU::DjVuText::decode (this=0x5555556ad090, gbs=...) at DjVuText.cpp:705 #2 0x00007ffff7b7ba16 in ddjvu_document_get_pagetext (document=0x55555561fdb0, pageno=pageno@entry=8, maxdetail=maxdetail@entry=0x555555401e23 "page") at ddjvuapi.cpp:3623 #3 0x0000555555401732 in dopage (pageno=9) at djvutxt.cpp:147 #4 0x0000555555401c69 in parse_pagespec (s=0x555555401eab "1-$", max_page=10, dopage=dopage@entry=0x5555554016d0 <dopage(int)>) at djvutxt.cpp:245 #5 0x000055555540137a in main (argc=<optimized out>, argv=0x7fffffffe7c8) at djvutxt.cpp:359 (gdb) This looks similarly to 3.5.28. Adding 254b3f3f3824960eb1eed5f3d5683c30365ff95c and 2ad2b702d864d1974f0c569a7594b27e67c64a40, then: beth:/187869 # djvutxt poc 1/11/2019 file:///home/fish/Desktop/cjoocjle/domato/pdf/fuzz-347.html 1/10 1/11/2019 file:///home/fish/Desktop/cjoocjle/domato/pdf/fuzz-347.html 2/10 1/11/2019 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 3/10 1/11/2019 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 4/10 1/11/2019 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 5/10 1/11/2019 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 6/10 1/11/2019 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 7/10 1/11/2019 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 8/10 1/11/2019 J 11YG9 file:///home/fish/Desktop/google/domato/pdf/fuzz-347.html 10/10 beth:/187869 #
Submitted again for 15sp2,15,12,11/djvulibre.
SUSE-SU-2021:14773-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: SUSE Linux Enterprise Server 11-SP4-LTSS (src): djvulibre-3.5.21-3.18.1 SUSE Linux Enterprise Point of Sale 11-SP3 (src): djvulibre-3.5.21-3.18.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): djvulibre-3.5.21-3.18.1 SUSE Linux Enterprise Debuginfo 11-SP3 (src): djvulibre-3.5.21-3.18.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.
SUSE-SU-2021:2621-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: SUSE OpenStack Cloud Crowbar 9 (src): djvulibre-3.5.25.3-5.19.2 SUSE OpenStack Cloud Crowbar 8 (src): djvulibre-3.5.25.3-5.19.2 SUSE OpenStack Cloud 9 (src): djvulibre-3.5.25.3-5.19.2 SUSE OpenStack Cloud 8 (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Software Development Kit 12-SP5 (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server for SAP 12-SP4 (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server for SAP 12-SP3 (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server 12-SP5 (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server 12-SP4-LTSS (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server 12-SP3-LTSS (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server 12-SP3-BCL (src): djvulibre-3.5.25.3-5.19.2 SUSE Linux Enterprise Server 12-SP2-BCL (src): djvulibre-3.5.25.3-5.19.2 HPE Helion Openstack 8 (src): djvulibre-3.5.25.3-5.19.2 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.
openSUSE-SU-2021:2619-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: openSUSE Leap 15.3 (src): djvulibre-3.5.27-11.11.1
SUSE-SU-2021:2619-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP3 (src): djvulibre-3.5.27-11.11.1 SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP2 (src): djvulibre-3.5.27-11.11.1 SUSE Linux Enterprise Module for Desktop Applications 15-SP3 (src): djvulibre-3.5.27-11.11.1 SUSE Linux Enterprise Module for Desktop Applications 15-SP2 (src): djvulibre-3.5.27-11.11.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.
openSUSE-SU-2021:1112-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: openSUSE Leap 15.2 (src): djvulibre-3.5.27-lp152.7.9.1
# maintenance_jira_update_notice SUSE-SU-2021:2796-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1187869 CVE References: CVE-2021-3630 JIRA References: Sources used: SUSE Manager Server 4.0 (src): djvulibre-3.5.27-3.19.1 SUSE Manager Retail Branch Server 4.0 (src): djvulibre-3.5.27-3.19.1 SUSE Manager Proxy 4.0 (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise Server for SAP 15-SP1 (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise Server for SAP 15 (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise Server 15-SP1-LTSS (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise Server 15-SP1-BCL (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise Server 15-LTSS (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise High Performance Computing 15-LTSS (src): djvulibre-3.5.27-3.19.1 SUSE Linux Enterprise High Performance Computing 15-ESPOS (src): djvulibre-3.5.27-3.19.1 SUSE Enterprise Storage 6 (src): djvulibre-3.5.27-3.19.1 SUSE CaaS Platform 4.0 (src): djvulibre-3.5.27-3.19.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.
This is an autogenerated message for OBS integration: This bug (1187869) was mentioned in https://build.opensuse.org/request/show/1087909 Factory / djvulibre