Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java security restrictions #350

Open
ifrh opened this issue Aug 10, 2022 · 4 comments
Open

Java security restrictions #350

ifrh opened this issue Aug 10, 2022 · 4 comments

Comments

@ifrh
Copy link
Contributor

ifrh commented Aug 10, 2022

In Praktomat/src/checker/scripts/javac there is a german comment containing thoughts about security restrictions at compile and execution time:

#!/bin/bash
# set -x
# $Id: java,v 1.1 2002/07/19 12:22:10 krinke Exp $
# Sicherheitsaspekte: siehe javac.

# $Id: javac,v 1.1 2002/07/19 12:22:10 krinke Exp $
# Sicherheitsaspekte:
# 1. Die Uebersetzung findet mit einer deutlich reduzierten
# Klassen-Bibliothek statt (javac-sandbox.jar).
# 2. Die Ausfuehrung findet mit einer deutlich reduzierten
# Klassen-Bibliothek statt (java-sandbox.jar).
# 3. Die Ausfuehrung findet mit einer leeren policy statt.

In that comment two JAR files are mentioned:

  • javac-sandbox.jar
  • java-sandbox.jar

I cannot find a trace to this two files and I do not see how they would be used in Praktomat/src/checker/scripts/javac or Praktomat/src/checker/scripts/java .

And in issue #307 it is mentioned that Java's Security Manager is deprecated.

By the way, I think restricted java environments should allow parametrized tests (i.e. JUNIT-PARAMS)

@ifrh
Copy link
Contributor Author

ifrh commented Aug 31, 2022

@jkrinke : Do you remember where one can find the jar files you mentioned in the year 2002 ?

@jkrinke
Copy link
Contributor

jkrinke commented Sep 1, 2022

This is really old stuff... I indeed found some old scripts that relate to the sandbox and its creation. Please find attached.
old.zip

@ifrh
Copy link
Contributor Author

ifrh commented Sep 1, 2022

@jkrinke : Thanks for attaching "old.zip".
In the script create-sandbox from your old.zip there are the lines:

cp $1 java-sandbox.jar
cp $1 javac-sandbox.jar

can you remember what filename was used to fill $1 ?

@jkrinke
Copy link
Contributor

jkrinke commented Sep 1, 2022

Probably it was ./jre/lib/rt.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants