Skip to content
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

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal #56531

Open
vdata1 opened this issue Jan 9, 2025 · 1 comment
Open

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal #56531

vdata1 opened this issue Jan 9, 2025 · 1 comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. good first issue Issues that are suitable for first-time contributors.

Comments

@vdata1
Copy link

vdata1 commented Jan 9, 2025

Version

v23.6.0

Platform

Linux SMP Debian 5.10.103-1 (2022-03-07) x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Hi,

I would like to report a bug, it can be reproduced by running the PoC below:

const {exec} = require('child_process');

Object.defineProperty(Array.prototype, "2", {
  set: function () {},
});

(async function () {
  exec('pwd', (err, stdout, stderr) => {
    console.log(stdout);
  });
})();

Regards,

AH

How often does it reproduce? Is there a required condition?

It reproduces anytime by simply running the given PoC on the given Node.js version.

What is the expected behavior? Why is that the expected behavior?

It is a crash.

What do you see instead?

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal

Additional information

No response

@joyeecheung
Copy link
Member

joyeecheung commented Jan 10, 2025

In general we provide no guarantee about the usability of the process once builtin prototypes like this are modified, so it's not technically a bug, but poor UX at worst. It would be a UX improvement to at least not crash, if it's not too invasive a change to defend against it.

Marking as good first issues, though just for those who are willing to debug the C++ internals.

@joyeecheung joyeecheung added good first issue Issues that are suitable for first-time contributors. c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

No branches or pull requests

2 participants