Re: Malicious code with limited character set?



On 30 Mar, 14:49, "Paul E Collins" <find_my_real_addr...@xxxxxxx>
wrote:
"Paul E Collins" <find_my_real_addr...@xxxxxxx> wrote:

Without semicolons or braces, I believe the user will not be able to
create an expression that does anything bad (such as an infinite
loop or attempts at file access). Can anyone prove me wrong?

Curses. I've just found out that the semicolon isn't necessary, i.e.
this infinite loop will work in "eval" rather than raising a syntax
error: while(true)continue

I think I'll just have to ban upper- and lower-case letters altogether
unless they form part of a recognised Math library function.

Eq.

can you set limits on the resources (CPU/time,mem) this dll will use,
and if the call throws an error... IMHO blacklisting will never work,
someone who wants to will find a way.
What model can you impose for the class of expression do you allow, if
you only allowed polynomials up to a certain degree, or allowed only
certain types of formatting of certain operators, I'm thinking of ^(a/
b) for roots, you could lock the thing down using regular expressions.
It would be up to the customer not to try to use
^(123^123456/-6^(-7)) because you only accept ^a/b where a and b are
integers, (^c where c is rational) up to a certain accuracy.
Am I being too simplistic or forcing your users to jump through too
many hoops, how advanced are they? - the more advanced the less
restrictions they would mind.

.



Relevant Pages

  • Infinite loop in PSOS_INIT()
    ... ARM instruction set simulator) the processor goes into an infinite ... loop at PSOS_INIT. ... We are using ARMulator to simulate a system that has an ARM946ES ...
    (comp.arch.embedded)
  • Re: Malicious code with limited character set?
    ... loop or attempts at file access). ... Curses. ... this infinite loop will work in "eval" rather than raising a syntax ...
    (comp.lang.javascript)
  • Re: How to find out if process is in a loop?
    ... the problem of finding whether a problem is in an infinite ... For more information refer ... the program which i suspect to be in an infinite loop. ... the same stack repeatedly something is a problem. ...
    (comp.unix.aix)
  • Re: StackOverflowException with attribute
    ... I figured that the recursion wasn't infinite. ... it would seem that the call to GetProperties on the ... You need to find some way to break this loop. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: whats consensus or standard on what should "while(1){}" do? loop forever or do nothing?
    ... Doing nothing forever takes infinite time and never gets to ... The block has no side effects, so the compiler could remove it without ... But, according to the rules of C, your loop does terminate eventually. ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)