Bug 1164404 - [GSS] (6.3.z) Upgrade resteasy from 2.3.8.SP3-redhat-2 to 2.3.8.SP4-redhat-1
Summary: [GSS] (6.3.z) Upgrade resteasy from 2.3.8.SP3-redhat-2 to 2.3.8.SP4-redhat-1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Build
Version: 6.3.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.3.3
Assignee: Paul Gier
QA Contact: Katerina Odabasi
URL:
Whiteboard:
Depends On: 1163547 1165331 1174117
Blocks: eap633-payload
TreeView+ depends on / blocked
 
Reported: 2014-11-14 23:52 UTC by Brad Maxwell
Modified: 2019-08-19 12:38 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1164401
Environment:
Last Closed: 2019-08-19 12:38:56 UTC
Type: Component Upgrade
Embargoed:


Attachments (Terms of Use)

Description Brad Maxwell 2014-11-14 23:52:40 UTC
+++ This bug was initially created as a clone of Bug #1164401 +++

Description of problem:

Upgrade resteasy to resolve the linked issues

Comment 5 Rostislav Svoboda 2014-12-16 13:01:32 UTC
qa_nacking because SP4 contains more changes than expected, problem is in commit for BZ 1165331.

Details:
The commit - http://git.app.eng.bos.redhat.com/git/resteasy.git/commit/?id=d50bc0a4e36894e0256f0d62fb2cd7a25f042ac2&h=2.3.8.SP4-redhat contains code which was added in resteasy 2.3.9 as part of the https://bugzilla.redhat.com/show_bug.cgi?id=1090487, which adds secure processing to resteasy.
The patch has enableSecureProcessingFeature and disableDTDs in addition. DocumentBuilder will set up hardcoded values and user has no option to customize them.
The resteasy.document.secure.disableDTDs and resteasy.document.secure.processing.feature options for web.xml were introduced in resteasy 2.3.9 and we are talking about 2.3.8 here.

Comment 6 Weinan Li 2014-12-16 15:59:04 UTC
Hi Rostislav,

Only the fix for CVE-2014-7839 will be needed, is that correct? Then I'll only include this patch and rebuild  2.3.8.SP4-redhat:

diff --git a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java b/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java
index 56e0b31..40bb968 100644
--- a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java
+++ b/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java
@@ -90,6 +90,8 @@ public Document readFrom(Class<Document> clazz, Type type,
       try
       {
          documentBuilder.setExpandEntityReferences(expandEntityReferences);
+         documentBuilder.setFeature("http://xml.org/sax/features/external-general-entities", expandEntityReferences);
+         documentBuilder.setFeature("http://xml.org/sax/features/external-parameter-entities", expandEntityReferences);
          documentBuilder.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, enableSecureProcessingFeature);
          documentBuilder.setFeature("http://apache.org/xml/features/disallow-doctype-decl", disableDTDs);
          return documentBuilder.newDocumentBuilder().parse(input);

Comment 9 Katerina Odabasi 2014-12-18 11:34:28 UTC
Hi Weinan,

yes correct, the diff in the comment 6 is the patch for CVE-2014-7839.

The resteasy 2.3.8.SP4-redhat build should also contain the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1163547
which is acked as well for 6.3.3.

Comment 11 Weinan Li 2014-12-19 03:22:27 UTC
2.3.9 feature removed:

^Cpower:resteasy-prod-2.3.8 weinanli$ git diff
diff --git a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java b/
index af299b7..534230e 100644
--- a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java
+++ b/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DocumentProvider.java
@@ -42,8 +42,6 @@ public class DocumentProvider extends AbstractEntityProvider<Document>
    private final TransformerFactory transformerFactory;
    private final DocumentBuilderFactory documentBuilder;
    private boolean expandEntityReferences = false;
-   private boolean enableSecureProcessingFeature = true;
-   private boolean disableDTDs = true;

    public DocumentProvider(@Context ResteasyConfiguration config)
    {
@@ -76,8 +74,6 @@ public class DocumentProvider extends AbstractEntityProvider<Document>
          documentBuilder.setExpandEntityReferences(expandEntityReferences);
           documentBuilder.setFeature("http://xml.org/sax/features/external-general-entities", expandEn
           documentBuilder.setFeature("http://xml.org/sax/features/external-parameter-entities", expand
-          documentBuilder.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, enableSecureProcessingFea
-          documentBuilder.setFeature("http://apache.org/xml/features/disallow-doctype-decl", disableDT
          return documentBuilder.newDocumentBuilder().parse(input);
       }
       catch (Exception e)

Comment 12 Weinan Li 2014-12-19 07:41:00 UTC
https://github.com/jbossas/jboss-eap/pull/2027/files updated

Comment 13 Katerina Odabasi 2015-01-20 09:45:30 UTC
In EAP 6.3.3.CP.CR1 Resteasy was upgraded to 2.3.8.SP4-redhat-2.


Note You need to log in before you can comment on or make changes to this bug.