From issues-return-5880-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Mon Dec 2 21:59:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id BCE0318065B for ; Mon, 2 Dec 2019 22:59:02 +0100 (CET) Received: (qmail 67190 invoked by uid 500); 2 Dec 2019 21:59:01 -0000 Mailing-List: contact issues-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list issues@lucene.apache.org Received: (qmail 67116 invoked by uid 99); 2 Dec 2019 21:59:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2019 21:59:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 233C0E2EDB for ; Mon, 2 Dec 2019 21:59:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 4638B780197 for ; Mon, 2 Dec 2019 21:59:00 +0000 (UTC) Date: Mon, 2 Dec 2019 21:59:00 +0000 (UTC) From: "Robert Muir (Jira)" To: issues@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-13991) clean up permissions in solr-tests.policy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-13991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16986413#comment-16986413 ] Robert Muir commented on SOLR-13991: ------------------------------------ A first patch. I think i need to give my computer a break, reload the beer supply, and let all the TIME_WAITs go away. It can be difficult to tell signal from noise in the solr tests :( For sure I don't want to cause jenkins hell, so at least want to spin up a linux VM, because I think for some reason a lot of SSL tests are disabled on the mac? Not sure about windows. Also it would be better if i tested with multiple jvm versions, which I haven't done yet. Worst case, we can slow-step this patch one wildcard at a time rather than trying to tackle so many wildcards... we can expand one at a time. But I think its pretty close as is here. > clean up permissions in solr-tests.policy > ----------------------------------------- > > Key: SOLR-13991 > URL: https://issues.apache.org/jira/browse/SOLR-13991 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Robert Muir > Priority: Major > Attachments: SOLR-13991.patch > > > The solr-tests.policy is currently way too lenient. Its useful for tests but pretty worthless at defending against any attacker "for real" > For example imagine i can execute arbitrary java-ish code: > {code} > Runtime.getRuntime().exec("id"); > {code} > With a security manager enabled, I'd get an exception like this: > java.security.AccessControlException: access denied ("java.io.FilePermission" "<>" "execute") > Because the current policy is so lenient and has wildcard RuntimePermission, the next thing i'd try (disable security manager, then launch process) would happily execute: > {code} > System.setSecurityManager(null);Runtime.getRuntime().exec("id"); > {code} > That's because the current wildcard permission allows {{RuntimePermission("setSecurityManager")}}. > There are other variants I could use, some explained by java's docs: https://docs.oracle.com/javase/7/docs/api/java/lang/RuntimePermission.html > It will take time and pain to clean up this stuff: e.g. fixing code and maybe even third-party dependencies, but gotta start somewhere. I think splitting up the wildcards is a good first step :) -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org For additional commands, e-mail: issues-help@lucene.apache.org