Skip to content
Commits on Source (5)
lucene-solr (3.6.2+dfsg-22) unstable; urgency=medium
* Add myself to Uploaders and remove Jakub Adam, James Page and Mat Scales
because they are not active anymore.
* Declare compliance with Debian Policy 4.4.1.
* Fix CVE-2019-0193:
The DataImportHandler, an optional but popular module to pull in data from
databases and other sources, has a feature in which the whole DIH
configuration can come from a request's "dataConfig" parameter. The debug
mode of the DIH admin screen uses this to allow convenient debugging /
development of a DIH config. Since a DIH config can contain scripts, this
parameter is a security risk. Starting from now on, use of this parameter
requires setting the Java System property "enable.dih.dataConfigParam" to
true. For example this can be achieved with solr-tomcat by adding
-Denable.dih.dataConfigParam=true to JAVA_OPTS in /etc/default/tomcat9.
-- Markus Koschany <apo@debian.org> Thu, 10 Oct 2019 17:39:16 +0200
lucene-solr (3.6.2+dfsg-21) unstable; urgency=high
* Team upload.
......
......@@ -3,9 +3,7 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders:
Mat Scales <mat@wibbly.org.uk>,
James Page <james.page@ubuntu.com>,
Jakub Adam <jakub.adam@ktknet.cz>
Markus Koschany <apo@debian.org>
Build-Depends:
ant,
ant-optional,
......@@ -46,7 +44,7 @@ Build-Depends:
libxml-commons-resolver1.1-java,
maven-repo-helper (>= 1.5~),
po-debconf
Standards-Version: 4.4.0
Standards-Version: 4.4.1
Vcs-Git: https://salsa.debian.org/java-team/lucene-solr.git
Vcs-Browser: https://salsa.debian.org/java-team/lucene-solr
Homepage: http://lucene.apache.org
......
From: Markus Koschany <apo@debian.org>
Date: Wed, 9 Oct 2019 17:41:28 +0200
Subject: CVE-2019-0193
Bug-Upstream: https://issues.apache.org/jira/browse/SOLR-13669
Origin: https://github.com/apache/lucene-solr/commit/325824cd391c8e71f36f17d687f52344e50e9715
---
.../apache/solr/handler/dataimport/DataImportHandler.java | 10 ++++++++++
.../dataimport/AbstractDataImportHandlerTestCase.java | 13 ++++++-------
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
index 9e11c79..a4a39a0 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
@@ -83,6 +83,10 @@ public class DataImportHandler extends RequestHandlerBase implements
private Map<String , Object> coreScopeSession = new HashMap<String, Object>();
+ static final String ENABLE_DIH_DATA_CONFIG_PARAM = "enable.dih.dataConfigParam";
+
+ final boolean dataConfigParam_enabled = Boolean.getBoolean(ENABLE_DIH_DATA_CONFIG_PARAM);
+
@Override
@SuppressWarnings("unchecked")
public void init(NamedList args) {
@@ -153,6 +157,12 @@ public class DataImportHandler extends RequestHandlerBase implements
return;
}
+ if (dataConfigParam_enabled == false) {
+ throw new SolrException(SolrException.ErrorCode.FORBIDDEN,
+ "Use of the dataConfig param (DIH debug mode) requires the system property " +
+ ENABLE_DIH_DATA_CONFIG_PARAM + " because it's a security risk.");
+ }
+
rsp.add("initArgs", initArgs);
String message = "";
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
index 1b49028..1cce926 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
@@ -30,7 +30,7 @@ import org.apache.solr.update.processor.UpdateRequestProcessor;
import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
import org.apache.solr.common.util.NamedList;
import org.junit.After;
-import org.junit.Before;
+import org.junit.BeforeClass;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -57,12 +57,11 @@ public abstract class AbstractDataImportHandlerTestCase extends
public static void initCore(String config, String schema) throws Exception {
initCore(config, schema, getFile("dih/solr").getAbsolutePath());
}
-
- @Override
- @Before
- public void setUp() throws Exception {
- super.setUp();
- }
+
+ @BeforeClass
+ public static void baseBeforeClass() {
+ System.setProperty(DataImportHandler.ENABLE_DIH_DATA_CONFIG_PARAM, "true");
+ }
@Override
@After
......@@ -17,3 +17,4 @@ CVE-2017-3163.patch
ant-1.10.patch
CVE-2018-1308.patch
web.xml.patch
CVE-2019-0193.patch