child_process: spawnSync crashes trying to terminate setuid child because of maxBuffer exceeded #31747
Labels
child_process
Issues and PRs related to the child_process subsystem.
confirmed-bug
Issues with confirmed bugs.
What steps will reproduce the bug?
OR
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
I expect to get
ENOBUF
(because of maxBuffer reached) and/orEPERM
(because child process cannot be killed), so I can handle it somehow - but not crash.What do you see instead?
Additional information
According to documentation,
child_process.spawnSync()
terminates child process if it's output is larger thanmaxBuffer
. If child process can't be killed (because of setuid call), node crashes inCHECK()
below https://github.com/nodejs/node/blob/master/src/spawn_sync.cc#L611:Shouldn't we also check for UV_EPERM?
The text was updated successfully, but these errors were encountered: