bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I think I may have found a possible dos attack vector within bash.


From: Eamonn Smyth
Subject: I think I may have found a possible dos attack vector within bash.
Date: Tue, 20 Mar 2012 16:47:51 +0000

Without sounding alarmist, I can break my machine using bash. I also have a
fix. I shall be officially releasing the c code this weekend at the
hackathon london.

As my code following correctly implements the logic the dos attack vector
is negated.

The replacement code

    /*Do openql maths Now*/
    //Exploiting the Fundamental Theorem of Arithmetic
    int i;
    int vcount = 0;

    for (c=0;c<matrixsize;c++){

        for (i=0;i<levels;i++){


            if (gptr[i]->vcount == gptr[i]->Xsize){
                gptr[i]->vcount = 0;
                gptr[i]->get++;

            }

            if (gptr[i]->get > (gptr[i]->begin + (gptr[i]->groupsize -1)))
                gptr[i]->get = gptr[i]->begin;


            int get = gptr[i]->get;

            printf("%s",lookup[gptr[i]->get]);//This line is writing the
machine states on turings tape.

        gptr[i]->vcount++;
        }
        if (i == levels)
            printf("\n");
    }
    //printf("End Of Turing Tape.\n");//Realized 19th March 2012  A Few
Days before the Hackathon.
}

As the maintainers of bash it should be easy for you using your knowledge
base of bash schemantics to implement.

As apposed to me learning bash.

This will constitute my first patch contribution to linux and gnu.

Cheers.
Eamonn.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]