From issues-return-5891-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Mon Dec 2 23:32: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 E3B5F18065B for ; Tue, 3 Dec 2019 00:32:02 +0100 (CET) Received: (qmail 89546 invoked by uid 500); 2 Dec 2019 23:32:02 -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 89523 invoked by uid 99); 2 Dec 2019 23:32:02 -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 23:32:02 +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 29030E2EDB for ; Mon, 2 Dec 2019 23:32:00 +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 4F71A7804E1 for ; Mon, 2 Dec 2019 23:32:00 +0000 (UTC) Date: Mon, 2 Dec 2019 23:32: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=16986457#comment-16986457 ] Robert Muir commented on SOLR-13991: ------------------------------------ Current patch seems good with {{-Dtests.slow=true}} on mac os X. Gonna run with my luck, spinning up a linux VM... > 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, SOLR-13991.patch, SOLR-13991.patch, 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