Hello All,

I apologize in advance if my question is off-topic for this mailing list, and 
if so, y'all are free to just ignore it.

In essence, I was under a (seemingly wrong) impression that user-level classic 
fork-bomb such as the infamous,

":(){ :|:& };:"

would not be possible because Windows would run out of memory creating the 
processes, and at some point Cygwin's fork() would fail, thus, stopping the 
chain reaction.

That obviously is not the case, and the above (run by a non-privileged user) 
kills the OS quite successfully, rendering it totally non-responsive (even 
mouse stops moving at some point as well) with only a hardware reset being able 
to bring it back to life.

(To confirm, I experimented with that on the all current Windows 10 Pro.)

So the first part of my question is, whether this is actually expected to 
happen?

By default Cygwin creates the user environment with unlimited processes (and I 
suppose that any user can just run "bash" unrestricted, thus obtaining the 
unlimited process resource).  Which then brings up a question about security of 
the system, as a whole.  And so the second part is, is there any way to 
securely control / restrict the behavior?

Thank you,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
  • Fork bomb question about C... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin

Reply via email to