bug-bash
[Top][All Lists]
Advanced

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

Re: Fwd: Crashing the Linux System


From: Greg Wooledge
Subject: Re: Fwd: Crashing the Linux System
Date: Sat, 17 Jun 2023 10:17:10 -0400

On Sat, Jun 17, 2023 at 09:09:23AM +0530, LitHack wrote:
> Running the yes command in command substitution will crash the linux shell.

Not surprising, really.  You're trying to capture and store an
infinite number of bytes in memory.  Eventually, either the malloc is
going to fail due to lack of virtual memory, or the Linux OOM (Out Of
Memory) Killer is going to step in and start killing random processes.

> According to me inside command the substitution it is creating multiple
> process(fork).  Command: `yes` or $(yes)

The command substitution only creates one new process, but that process
will try to consume an infinite amount of memory.



reply via email to

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