Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bf opened this issue Dec 2, 2024 · 0 comments
Open

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

bf opened this issue Dec 2, 2024 · 0 comments

Comments

@bf
Copy link

bf commented Dec 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant