Plugin Security (Was Re: How do I create a SqueakPlugin.image
from a 2.9a ?)
John M McIntosh
johnmci at smalltalkconsulting.com
Tue Jan 23 05:47:01 UTC 2001
>Luciano Notarfrancesco <lnotarfrancesco at yahoo.com> is widely
>believed to have written:
>> And there might be other ways to do this
>> too... like replacing a CompiledMethod by a primitive
>> method with primitive 117 (externalCall) and put in
>> the first literal an array like described in
>> Interpreter|primitiveExternalCall but with the
>> appropiate address in the last position. I'm not sure
>> this will work... I never tryed it.
>With effort you could certainly do some nasty things this way. I'm
>looking into making plugins have an explicit list of allowed functions
>as a way to avoid deliberate or accidental problems of this sort; it's
>something AndreasR sugested a while ago.
>Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
>Useful random insult:- He hasn't a single redeeming vice. -- Oscar Wilde
On the macintosh the plugin VM *only* looks in the plugin folder that
lurks in the Preferences:Squeak folder. The Squeak VM should not
have write access to that folder (I hope...) Now if course if you
have FFI support then well then the sky is the limit.
For the regular macintosh Squeak VM the plugin search follows a
complicated path as Dan I found out a few days ago. It looks by file
name in the VM subdirectory plugins folder, then the VM folder. If
not found then it looks by internal name which can be different than
file name in the VM folder, then various places in the System folder.
Failing that it looks for it as part of the code within the VM file.
Most of that is short circuited by the plugin logic to avoid way too
much of an opportunity to linkto and call all sorts of macintosh
Oh, some care has been taken to avoid the abuse of URLS, there seems
to be lots of interesting things you can code up if you can build any
URL of your choice and have the browser/plugin logic invoke it.
RFC1738 claims you can upload files via the proper URL, but doesn't
give an example.
I can't say what or if you could cobble up a CompiledMethod as per
above and attempt to execute it as a powerpc instruction set. It
might not quite work due to instruction versus data cache issues (but
I'm sure you could figure out a way).
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7 E94A EE69 2D21 46FC 3BE6
More information about the Squeak-dev