Skip to content

Panic when executing specially-crafted file #129

Open
@highwaycoder

Description

@highwaycoder

If you create a file called /bin/loop with the following contents:

#!/bin/loop

The VINIX kernel will infinitely recurse in the userland.start_program function, until it eventually runs out of stack space and panics.

The way Linux deals with this case is by keeping track of the recursion depth, and setting errno = ELOOP and returning if the arbitrary max depth is reached (I believe the depth is 4 on linux, but don't quote me on that).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions