Skip to content

[rust-enhanced] include! macro: systemd crash #536

Description

@bf

the include! macro can be used to crash systemd and force user to re-login.

I have tested this on linux 6.12.1 with sublime-text and rust-enhanced
plugin but it should affect all situations where rustc is spawned as
child process.

Example:

compile_error!(include!("/dev/zero"));

This will fill up all ram at compile time until rustc is OOM-aborted by
the kernel.

Then the IDE (in my case sublime-text) will try to read the compile
error message via the open pipe to rustc it will also be OOM-aborted.

On my system this results in full systemd crash. User will be shown
login screen again, all programs are closed. Just from compiling rust code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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