[plt-scheme] Introducing... Stuffers

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Feb 6 20:43:52 EST 2009

On Fri, Feb 6, 2009 at 6:15 PM, Henk Boom <henk at henk.ca> wrote:
> 2009/2/6 Raoul Duke <raould at gmail.com>:
>>> I've been meaning to ask this for a while, but what are the security
>>> consequences with storing the continuation on the (untrusted) client's
>>> computer?
>> hm, mr no security expert here, but i'd guess it would be very similar
>> to whatever the deal is with cookies.
>> i mean, you can encrypt the continuation so the client most likely
>> can't read it, but they could still transfer it to a different machine
>> or replay it a lot or whatever, so your server would have to deal with
>> that.
> Cookies are usually used to uniquely identify the user, so that the
> right session can be loaded by the server, whereas in this case the
> continuation itself is on the client's machine. I was thinking more
> along the lines of people modifying their continuations to make the
> server execute different code. I'm asking because I don't know enough
> about how the continuations are serialized to know what the dangers
> are, and as far as I can see the documentation makes no mention of
> security considerations.

The point of stuffers is for you to control how the continuations get

If you just use serialize-stuffer, then the user can change anything
they want. They can only get you to run code that you've already
written, but they can change values in the environment.

If you use the md5-stuffer, then they never get the continuation, so
it's no big deal.

If you write a encryption or signing stuffer (which is a really
trivial wrapper over openssl, I'll probably have one by noon when I
work again on monday), then you can just encrypt/sign the cont. If you
encrypt, they can't modify and observe. If you just sign, then they
can't modify, but could observe (depending on the algorithm, obvs.)

Basically, if you're worried use encrypt/sign or md5, but unless you
have stuff like usernames, the environment won't be a very good attack
vector. (For example, in Continue you'd be able to change the sort
state, whooptity-doo.)


Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.