Docsity

Java Byte Code – Programming Languages Technologies and Paradigms | CMSC 433, Study notes of Programming Languages

Partial preview of the text

Download Java Byte Code – Programming Languages Technologies and Paradigms | CMSC 433 and more Study notes Programming Languages in PDF only on Docsity!

1

Reading for Wednesday

http://www.acm.org/classics/sep95/ http://reactor-core.org/stack-smashing.html

CMSC 433 – Programming Language

Technologies and Paradigms

Spring 2006

Security

April 22, 2006

3

So You Want to Download Code

  • What if code does bad things?
    • rm .
  • Solution 1: Trust everyone
    • Not such a good idea 4

So You Want to Download Code

  • Solution 2: Trust certain parties
    • E.g., Microsoft, Apple, RedHat
    • Often code will be signed
      • Very hard to impersonate trusted party
  • Solution 3: Limit your trust
    • Download anyone’s code, but...
    • Limit what it can do

7

Beyond Type Safety

  • Type safety is good, but not enough
    • rm . doesn’t seg fault!
  • We need more kinds of restrictions
    • Can’t write files
    • Can’t connect over the network 8

JDK 1.0 Security Model

(from java.sun.com 1.2 Security tutorial)

9

Sandboxing

  • Remote code runs in “safe” environment
    • Can’t do much harm
    • Unix example: chroot
  • Local programs have full access
    • Outside the sandbox 10

JDK 1.1 Security Model

(from java.sun.com 1.2 Security tutorial)