Bugzilla – Bug 1184356
VUL-0: CVE-2021-27807: apache-pdfbox: infinite loop while loading a crafted PDF file
Last modified: 2023-01-09 15:58:06 UTC
rh#1941055 A carefully crafted PDF file can trigger an infinite loop while loading the file. This issue affects Apache PDFBox version 2.0.22 and prior 2.0.x versions. References: https://www.openwall.com/lists/oss-security/2021/03/19/9 https://lists.apache.org/thread.html/r818058ff1e4b9f6bef4e5a2e74faff38cb3d3885c1e2db398bc55cfb@%3Cusers.pdfbox.apache.org%3E References: https://bugzilla.redhat.com/show_bug.cgi?id=1941055 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-27807 http://www.openwall.com/lists/oss-security/2021/03/19/9 http://seclists.org/oss-sec/2021/q1/247 https://access.redhat.com/security/cve/CVE-2021-27807 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27807 https://lists.apache.org/thread.html/raa35746227f3f8d50fff1db9899524423a718f6f35cd39bd4769fa6c@%3Cnotifications.ofbiz.apache.org%3E https://lists.apache.org/thread.html/rc69140d894c6a9c67a8097a25656cce59b46a5620c354ceba10543c3@%3Cnotifications.ofbiz.apache.org%3E https://lists.apache.org/thread.html/re1e35881482e07dc2be6058d9b44483457f36133cac67956686ad9b9@%3Cnotifications.ofbiz.apache.org%3E https://lists.apache.org/thread.html/r1d268642f8b52456ee8f876b888b8ed7a9e9568c7770789f3ded7f9e@%3Ccommits.ofbiz.apache.org%3E https://lists.apache.org/thread.html/r5c8e2125d18af184c80f7a986fbe47eaf0d30457cd450133adc235ac@%3Ccommits.ofbiz.apache.org%3E https://lists.apache.org/thread.html/r7ee634c21816c69ce829d0c41f35afa2a53a99bdd3c7cce8644fdc0e@%3Cnotifications.ofbiz.apache.org%3E https://lists.apache.org/thread.html/r1218e60c32829f76943ecaca79237120c2ec1ab266459d711a578b50@%3Cdev.pdfbox.apache.org%3E https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AVLKAHFMPH72TTP25INPZPGX5FODK3H/ https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6KDA2U4KL2N3XT3PM4ZJEBBA6JJIH2G4/ https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6PT72QOFDXLJ7PLTN66EMG5EHPTE7TFZ/ https://lists.apache.org/thread.html/r6e067a6d83ccb6892d0ff867bd216704f21fb0b6a854dea34be04f12@%3Cnotifications.ofbiz.apache.org%3E https://lists.apache.org/thread.html/r818058ff1e4b9f6bef4e5a2e74faff38cb3d3885c1e2db398bc55cfb%40%3Cusers.pdfbox.apache.org%3E https://lists.apache.org/thread.html/r818058ff1e4b9f6bef4e5a2e74faff38cb3d3885c1e2db398bc55cfb@%3Cusers.pdfbox.apache.org%3E https://lists.apache.org/thread.html/r043edc5dcf9199f7f882ed7906b41cb816753766e88b8792dbf319a9@%3Cannounce.apache.org%3E https://lists.apache.org/thread.html/r4717f902f8bc36d47b3fa978552a25e4ed3ddc2fffb52b94fbc4ab36@%3Cusers.pdfbox.apache.org%3E https://lists.apache.org/thread.html/r9ffe179385637b0b5cbdabd0246118005b4b8232909d2d14cd68ccd3@%3Ccommits.ofbiz.apache.org%3E
It looks like this is only affecting Factory. openSUSE:Factory pdfbox-2.0.22-src.zip All other SUSE and openSUSE code streams are on 1.8.x versions. SUSE:SLE-15-SP2 pdfbox-1.8.16-src.zip SUSE:SLE-15 pdfbox-1.8.12-src.zip openSUSE:Leap:15.2 pdfbox-1.8.16-src.zip
Apparently there are two CVEs, CVE-2021-27807 and CVE-2021-27906. CVE-2021-27906 is fixed by https://github.com/apache/pdfbox/commit/8c47be1011c11dc47300faecffd8ab32fba3646f, but I can't tell which commits are needed for CVE-2021-27807. Knowing that would be necessary to figure out whether SLE is also affected, which means version 1.8. The code causing CVE-2021-27906 is not in 1.8 at least. Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which should be relatively simple. However, I can't submit the update because I simply don't know how the -build.tar.xz tarball with the ant build is generated. It doesn't seem to be generated. In any case, I can no longer maintain this package, as I left the team pdfbox was packaged for years ago, so I'm looking for a new maintainer.
(In reply to Fabian Vogt from comment #2) > Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which > should be relatively simple. However, I can't submit the update because I > simply don't know how the -build.tar.xz tarball with the ant build is > generated. It doesn't seem to be generated. * documented on https://en.opensuse.org/openSUSE:Packaging_Java or https://en.opensuse.org/openSUSE:Maven.
(In reply to Fabian Vogt from comment #2) > Apparently there are two CVEs, CVE-2021-27807 and CVE-2021-27906. > > CVE-2021-27906 is fixed by > https://github.com/apache/pdfbox/commit/ > 8c47be1011c11dc47300faecffd8ab32fba3646f, but I can't tell which commits are > needed for CVE-2021-27807. > > Knowing that would be necessary to figure out whether SLE is also affected, > which means version 1.8. The code causing CVE-2021-27906 is not in 1.8 at > least. I can't tell either but only Factory seems affected since the advisory says its only for versions 2.0.x. > Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which > should be relatively simple. However, I can't submit the update because I > simply don't know how the -build.tar.xz tarball with the ant build is > generated. It doesn't seem to be generated. I just submitted the update to version 2.0.23 here: https://build.opensuse.org/request/show/884606 > In any case, I can no longer maintain this package, as I left the team > pdfbox was packaged for years ago, so I'm looking for a new maintainer. Regarding maintainership, I'm extremely busy right now...
(In reply to Pedro Monreal Gonzalez from comment #4) > (In reply to Fabian Vogt from comment #2) > > Apparently there are two CVEs, CVE-2021-27807 and CVE-2021-27906. > > > > CVE-2021-27906 is fixed by > > https://github.com/apache/pdfbox/commit/ > > 8c47be1011c11dc47300faecffd8ab32fba3646f, but I can't tell which commits are > > needed for CVE-2021-27807. > > > > Knowing that would be necessary to figure out whether SLE is also affected, > > which means version 1.8. The code causing CVE-2021-27906 is not in 1.8 at > > least. > > I can't tell either but only Factory seems affected since the advisory says > its only for versions 2.0.x. They might not care about 1.8 anymore and just ignore that... > > Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which > > should be relatively simple. However, I can't submit the update because I > > simply don't know how the -build.tar.xz tarball with the ant build is > > generated. It doesn't seem to be generated. > > I just submitted the update to version 2.0.23 here: > https://build.opensuse.org/request/show/884606 How is -build.tar.xz generated? Without having that written down, only you can update this package... > > In any case, I can no longer maintain this package, as I left the team > > pdfbox was packaged for years ago, so I'm looking for a new maintainer. > > Regarding maintainership, I'm extremely busy right now... So am I, but I have no experience in Java (esp. Maven) packaging. I'm mostly fine with backporting the few fixes to SLE, but I don't have the necessary knowledge to deal with the Factory package, also because I don't actually use it (anymore). Maybe the Doc team can take over maintainership? This was originally packaged for them, fontbox became a dependency of xmlgraphics-fop.
(In reply to Fabian Vogt from comment #5) > (In reply to Pedro Monreal Gonzalez from comment #4) > > (In reply to Fabian Vogt from comment #2) > > > Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which > > > should be relatively simple. However, I can't submit the update because I > > > simply don't know how the -build.tar.xz tarball with the ant build is > > > generated. It doesn't seem to be generated. > > > > I just submitted the update to version 2.0.23 here: > > https://build.opensuse.org/request/show/884606 > > How is -build.tar.xz generated? Without having that written down, only you > can update this package... Fridrich generated the ant build system from the maven one and tweaked the versions and paths here: https://build.opensuse.org/request/show/811300 I checked that the versions and paths haven't changed and I just had to update the version value in common.xml to 2.0.23 and compress again.
(In reply to Pedro Monreal Gonzalez from comment #6) > (In reply to Fabian Vogt from comment #5) > > (In reply to Pedro Monreal Gonzalez from comment #4) > > > (In reply to Fabian Vogt from comment #2) > > > > Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which > > > > should be relatively simple. However, I can't submit the update because I > > > > simply don't know how the -build.tar.xz tarball with the ant build is > > > > generated. It doesn't seem to be generated. > > > > > > I just submitted the update to version 2.0.23 here: > > > https://build.opensuse.org/request/show/884606 > > > > How is -build.tar.xz generated? Without having that written down, only you > > can update this package... > > Fridrich generated the ant build system from the maven one and tweaked the > versions and paths here: > https://build.opensuse.org/request/show/811300 How? I've never used maven before, is there a single command which spits out that tarball? > I checked that the versions and paths haven't changed and I just had to > update the version value in common.xml to 2.0.23 and compress again.
(In reply to Fabian Vogt from comment #7) > (In reply to Pedro Monreal Gonzalez from comment #6) > > (In reply to Fabian Vogt from comment #5) > > > (In reply to Pedro Monreal Gonzalez from comment #4) > > > > (In reply to Fabian Vogt from comment #2) > > > > > Tumbleweed has version 2.0.22 and would need an update to 2.0.23 which > > > > > should be relatively simple. However, I can't submit the update because I > > > > > simply don't know how the -build.tar.xz tarball with the ant build is > > > > > generated. It doesn't seem to be generated. > > > > > > > > I just submitted the update to version 2.0.23 here: > > > > https://build.opensuse.org/request/show/884606 > > > > > > How is -build.tar.xz generated? Without having that written down, only you > > > can update this package... > > > > Fridrich generated the ant build system from the maven one and tweaked the > > versions and paths here: > > https://build.opensuse.org/request/show/811300 > > How? I've never used maven before, is there a single command which spits out > that tarball? I think @Fridrich ported all the Maven stuff to build with ANT when updating from version 1 to version 2. I think he did it by hand, maybe following the build.xml files provided by version 1. But, he can give you more details about that. > > I checked that the versions and paths haven't changed and I just had to > > update the version value in common.xml to 2.0.23 and compress again.