Crash a RISC machine from user-mode code:

2915 mod at masscomp.ccur.com
Sun Aug 12 03:11:58 AEST 1990


In article <1990Aug10.101110.13698 at tsa.co.uk> domo at tsa.co.uk (Dominic Dunlop) writes:
>                                ...
>... after this, the [crashme] program gets stuck in a silent loop. Some
>time later, my system sprouts a rash of "Warning: swap space is low"s,
>the disk threatens to shake itself to bits, other processes start
>aborting, and response becomes snail-like.  But crashme eventually
>responds if sent a quit signal, and, after more feverish disk activity,
>the system recovers.
>
>I don't know precisely what's going on, but presume it's something a
>purpose-built malevolent user-mode program could do on any system
>(whether CISC or RISC) without user time and memory space quotas...
>-- 
>Dominic Dunlop

I agree,  because I'm just such a user ;->
Here's a program that causes behaviour exactly as you described:

/*
 * this program seems to make most swapping/demand paging
 * systems do unpleasant things...        (like run out of swap space.)
 */
#define MMU_PAGESIZE   (4096)                      /* or whatever... */
main()
{
    int array[ MMU_PAGESIZE / sizeof( int ) ];

    return( main( array[ 1000 ] )  );          /* Force a reference. */
}

The things done here could also be done a dozen other ways, but the
general effect is to consume so much RAM so fast that you choke and die.
Chances are that executing the random instructions in crashme caused 
some other part of the program to be modified and it then began to do
something such as this program does.                     Fun Stuff!



More information about the Comp.lang.c mailing list