Skip to content
Memory corruption Disclosed report Advanced

CWE-195 in ExternalMemoryAccounter::Increase()

A signed size value passed to a V8 memory accounting function could trigger garbage collection during an active garbage collection cycle. The reporter could not produce a proof of concept, so the practical impact is unproven.

codingthunder Follow

Originally disclosed on HackerOne

  • Disclosed after 8 days

Summary:

V8's ExternalMemoryAccounter::Increase() expects an unsigned size_t argument, but a signed ssize_t which in some cases results in garbage collection to happen during garbage collection. Here's a simplified version of what happens (full backtrace has been attached in the issue):

v8::internal::Heap::CollectAllGarbage
GC triggered by as negative integer passed to
v8::ExternalMemoryAccounter::Increase(v8::Isolate*, unsigned int)
called by
node::(anonymous namespace)::CompressionStream<node::(anonymous namespace)::ZlibContext>::Close()
during destruction of
node::(anonymous namespace)::ZlibStream::~ZlibStream
during an active GC
v8::internal::Heap::CollectGarbage

I could not produce a PoC due to limited experience with bug bounty. I believe provided these details, it is possible to do a PoC though. Also this is my first security report, so please feel free to correct me where I am wrong.

Description:

This bug was introduced in the commit https://github.com/nodejs/node/commit/1d5d7b6eedb2274c9ad48b5f378598a10479e4a7 while replacing deprecated calls to Isolate::AdjustAmountOfExternalAllocatedMemory. However mistakenly ExternalMemoryAccounter::Increase() is being called instead of ExternalMemoryAccounter::Update().

During GC, native objects are being destructed by V8. This results in calling destructor for ZlibStream which calls ExternalMemoryAccounter::Increase() instead of ExternalMemoryAccounter::Update()

Suggested Fix:

The following patch changes calls from ExternalMemoryAccounter::Increase() ExternalMemoryAccounter::Update() for passing in ssize_t (the patch has been prepared for the v24.6.0 tag and may not apply cleanly for other branches/main branch):

diff --git a/src/node_mem-inl.h b/src/node_mem-inl.h
index 06871d031d3..70d28dd524b 100644
--- a/src/node_mem-inl.h
+++ b/src/node_mem-inl.h
@@ -59,7 +59,7 @@ void* NgLibMemoryManager<Class, T>::ReallocImpl(void* ptr,
     // Environment*/Isolate* parameter and call the V8 method transparently.
     const int64_t new_size = size - previous_size;
     manager->IncreaseAllocatedSize(new_size);
-    manager->env()->external_memory_accounter()->Increase(
+    manager->env()->external_memory_accounter()->Update(
         manager->env()->isolate(), new_size);
     *reinterpret_cast<size_t*>(mem) = size;
     mem += sizeof(size_t);
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index c088c547539..b8617093bdf 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -644,7 +644,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
     if (report == 0) return;
     CHECK_IMPLIES(report < 0, zlib_memory_ >= static_cast<size_t>(-report));
     zlib_memory_ += report;
-    AsyncWrap::env()->external_memory_accounter()->Increase(
+    AsyncWrap::env()->external_memory_accounter()->Update(
         AsyncWrap::env()->isolate(), report);
   }

ExternalMemoryAllocator::Update() and ExternalMemoryAllocator::Decrease() properly takes care of not executing GC when memory is being released.

The above patch showed no regression in test cases on Linux x64 as well as Android i686

Steps To Reproduce:

I could only reproduce this issue inside https://github.com/termux/termux-docker for i686 and arm architecture. Although I believe this is a real issue on other architectures as well.

This is also reproducible on arm container, but I'll go ahead with i686 as arm container requires qemu-binfmt on x86 hosts or a arm host.

  1. Create the container for reproduction:

docker run -v -it --privileged termux/termux-docker:i686 docker container start <container_name>

  1. Workaround for bionic on Android not supporting pid >= 2**16 on 32-bit architectures (note that privileged docker containers are required for this workaround)

docker exec --user root -it "$container_id" bash -c "echo 32767 > /proc/sys/kernel/pid_max" 3. Start the shell

docker exec --user system -it "$container_id" bash

  1. Install nodejs
Shell
pkg update
pkg install nodejs

I've also attached debug builds of nodejs for Android i686 before and after the suggested patch. The debs can be installed using apt install ./path/to/nodejs.deb after copying them to the container

The packages are built using ./scripts/run-docker.sh ./build-package -I -a i686 -d nodejs with patches being applied from packages/nodejs/ directory

Impact

As far as I can tell GC inside GC is not an intended behaviour in the V8 engine. In the source tree I can see checks in place to ensure that it does not happen. But at the same time I could not find any high level documentation regarding internals of V8.

Known affected platforms: Android x86 and Android arm32. I could not reproduce this bug on other architectures/platforms, although I believe this does also affect other platforms.

Supporting Material/References

Issue originally reported to downstream Termux project packaging nodejs in https://github.com/termux/termux-packages/issues/25455

The original report as published on HackerOne, by codingthunder. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Node.js embeds V8 and lets native add-ons and core modules allocate memory outside the JavaScript heap. V8 tracks that external memory through an ExternalMemoryAccounter, so it can decide when a garbage collection is worthwhile. The accounter exposes operations to increase, decrease and update the tracked amount, and the choice between them matters: the report notes that Update() and Decrease() take care of not executing GC when memory is being released.

This report concerns the zlib bindings in Node.js core, specifically ZlibStream and its CompressionStream class, which allocate and free native buffers as compression and decompression proceed. The affected code lives in the Node.js repository, https://github.com/nodejs/node.

Setup

The researcher could only reproduce the problem inside the Termux Docker images, on i686 and ARM. The reproduction below uses i686, because the ARM container needs qemu-binfmt on x86 hosts or an ARM host. The suggested patch was prepared against the v24.6.0 tag and may not apply cleanly to other branches or to main.

Debug builds of Node.js for Android i686, before and after the patch, were attached to the report as .deb packages. They are built with:

Shell
./scripts/run-docker.sh ./build-package -I -a i686 -d nodejs

with patches applied from the packages/nodejs/ directory, and installed with apt install ./path/to/nodejs.deb after copying them into the container.

Finding it

The researcher's starting point is the signature of ExternalMemoryAccounter::Increase(), which expects an unsigned size_t. In the zlib path it is being passed a signed ssize_t, and in some cases that results in garbage collection happening during garbage collection. The simplified backtrace given in the report is:

Text
v8::internal::Heap::CollectAllGarbage
GC triggered by as negative integer passed to
v8::ExternalMemoryAccounter::Increase(v8::Isolate*, unsigned int)
called by
node::(anonymous namespace)::CompressionStream<node::(anonymous namespace)::ZlibContext>::Close()
during destruction of
node::(anonymous namespace)::ZlibStream::~ZlibStream
during an active GC
v8::internal::Heap::CollectGarbage

The chain is what makes it look wrong: a GC is already running, V8 destroys native objects as part of that GC, the ZlibStream destructor runs, and from there a call into ExternalMemoryAccounter::Increase() triggers another collection.

The researcher states that no PoC was produced, citing limited experience with bug bounty work, and believes one is possible given these details. This was also their first security report.

Exploitation

The reproduction is a container-based one. The steps below are the ones given in the report.

Step 1: create and start the container

Bash
docker run -v -it --privileged termux/termux-docker:i686
docker container start <container_name>

This starts the i686 Termux image in privileged mode, which the next step depends on.

Step 2: raise the PID limit

The report describes this as a workaround for bionic on Android not supporting PIDs greater than or equal to 2**16 on 32-bit architectures, and notes that privileged containers are required for it:

Bash
docker exec --user root   -it "$container_id" bash -c "echo 32767 > /proc/sys/kernel/pid_max"

Step 3: start a shell as the system user

Bash
docker exec --user system -it "$container_id" bash

Step 4: install Node.js

Shell
pkg update
pkg install nodejs

After this, the debug builds attached to the report can be installed in the container to compare behaviour before and after the patch.

The report does not include a JavaScript trigger, a crashing input, or any output from the reproduction beyond the backtrace above.

Root cause

The bug was introduced in commit [redacted], while replacing deprecated calls to Isolate::AdjustAmountOfExternalAllocatedMemory. In that replacement, ExternalMemoryAccounter::Increase() was called where ExternalMemoryAccounter::Update() was intended.

During GC, V8 destructs native objects. That calls the ZlibStream destructor, which calls ExternalMemoryAccounter::Increase() instead of ExternalMemoryAccounter::Update(). Increase() takes an unsigned size_t, but the value passed here is a signed ssize_t, so a negative value reaches the accounter and triggers a GC from inside a GC.

The report notes that ExternalMemoryAllocator::Update() and ExternalMemoryAllocator::Decrease() properly take care of not executing GC when memory is being released. The report also says that checks exist in the V8 source tree to ensure GC inside GC does not happen, but that no high-level documentation of V8 internals was found to confirm the intended behaviour.

Impact

As far as the researcher can tell, GC inside GC is not intended behaviour in V8. The known affected platforms are Android x86 and Android arm32. The bug could not be reproduced on other architectures or platforms, although the researcher believes it affects them too. No exploitation beyond the GC-inside-GC behaviour described in the backtrace is demonstrated in the report.

Fix

The suggested patch changes the two call sites from ExternalMemoryAccounter::Increase() to ExternalMemoryAccounter::Update(), which the report says takes care of not executing GC when memory is being released. It was prepared for the v24.6.0 tag and may not apply cleanly elsewhere.

Diff
diff --git a/src/node_mem-inl.h b/src/node_mem-inl.h
index 06871d031d3..70d28dd524b 100644
--- a/src/node_mem-inl.h
+++ b/src/node_mem-inl.h
@@ -59,7 +59,7 @@ void* NgLibMemoryManager<Class, T>::ReallocImpl(void* ptr,
     // Environment*/Isolate* parameter and call the V8 method transparently.
     const int64_t new_size = size - previous_size;
     manager->IncreaseAllocatedSize(new_size);
-    manager->env()->external_memory_accounter()->Increase(
+    manager->env()->external_memory_accounter()->Update(
         manager->env()->isolate(), new_size);
     *reinterpret_cast<size_t*>(mem) = size;
     mem += sizeof(size_t);
Diff
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index c088c547539..b8617093bdf 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -644,7 +644,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
     if (report == 0) return;
     CHECK_IMPLIES(report < 0, zlib_memory_ >= static_cast<size_t>(-report));
     zlib_memory_ += report;
-    AsyncWrap::env()->external_memory_accounter()->Increase(
+    AsyncWrap::env()->external_memory_accounter()->Update(
         AsyncWrap::env()->isolate(), report);
   }

The patch showed no regression in test cases on Linux x64 and Android i686.

Variants to test

  1. Other Increase() call sites that receive a signed delta. Search the Node.js tree for external_memory_accounter()->Increase( and check whether the argument can be negative. A positive result is a call reached from a destructor or from a path that runs during GC.
  2. Other NgLibMemoryManager users. The ReallocImpl change covers every class built on that template. Exercise realloc paths that shrink buffers, for example by driving a native module that reallocates downward, and watch for a GC starting while another GC is active.
  3. 32-bit builds on other platforms. The report only confirms Android x86 and arm32. Build Node.js for another 32-bit target, run the zlib test suite, and look for the same GC-inside-GC backtrace.
  4. Zlib stream teardown under memory pressure. Create and destroy many compression and decompression streams while the heap is close to its limit, so that the destructor path runs during a collection. A positive result is the CollectAllGarbage frame appearing beneath ZlibStream::~ZlibStream in a stack trace.
  5. Debug builds with V8 GC checks enabled. Run the debug Node.js build from the report against the zlib tests. A positive result is an assertion or check failure in V8's GC re-entry guards rather than a silent double collection.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

Node.js is a program that runs JavaScript code outside a web browser, for example on a server. To run JavaScript, it uses another piece of software called V8, which is the same engine that powers Google Chrome. V8 keeps track of the memory that JavaScript code uses, and from time to time it cleans up memory that is no longer needed. That cleaning process is called garbage collection, or GC for short. You can picture it like a cleaner who walks through a building and throws away everything that is no longer in use.

Node.js also has parts written in C++ that need memory of their own, outside the area V8 manages for JavaScript. One of those parts is the zlib module, which compresses and decompresses data (the same kind of compression used in .zip files and in web traffic). Because V8 does not automatically know about this extra memory, Node.js tells V8 how much of it exists, using a small bookkeeping object called ExternalMemoryAccounter. Think of it as a tally sheet: Node.js writes down "I have borrowed this much memory" so V8 can decide when a cleanup is worth doing.

The tally sheet has several ways to write an entry: one to add memory (Increase()), one to subtract memory (Decrease()), and one to update the total (Update()). The difference matters: the report notes that Update() and Decrease() take care of not executing GC when memory is being released.

In this report, the researcher found that in one place Node.js used the "add memory" entry when it should have used the "update" entry. Worse, the number being written down could be negative. A negative amount of borrowed memory makes no sense, and V8 reacted by starting a cleanup. The problem is that this happened while a cleanup was already running, so V8 ended up trying to clean up during a cleanup. The researcher describes this as garbage collection happening during garbage collection.

The affected code is in the Node.js source code repository, https://github.com/nodejs/node, specifically in the zlib bindings. The researcher could only reproduce the problem on Android builds inside special containers, on two processor types: i686 (a 32-bit Intel-compatible processor) and ARM (the processor family used in most phones).

Setting up a test environment

To try to reproduce the problem, the researcher used Docker. Docker is a tool that lets you run a small, self-contained computer inside your computer, called a container. It is like a box with its own operating system and programs, which you can throw away afterwards without affecting your real machine.

The containers used here come from the Termux project, which packages Linux-style tools for Android. The researcher could only reproduce the issue inside these Termux Docker images, on i686 and ARM. The steps below use i686, because the ARM container needs extra software called qemu-binfmt on ordinary Intel/AMD computers, or a real ARM machine.

The researcher also attached debug builds of Node.js for Android i686, before and after the suggested fix, as .deb packages (the installation file format used by Debian-based systems, including Termux). These builds are made with the following command:

Shell
./scripts/run-docker.sh ./build-package -I -a i686 -d nodejs

Line by line: ./scripts/run-docker.sh runs a script inside a Docker container; ./build-package is the build tool being run; -I and -a i686 and -d nodejs are options that tell it to build a debug (-d) package of nodejs for the i686 architecture (-a i686). Patches are applied from the packages/nodejs/ directory. Once copied into the container, the packages are installed with apt install ./path/to/nodejs.deb, where apt is the package installer and the path points at the downloaded file.

One important detail: the suggested fix was prepared against the v24.6.0 tag (a named point in the Node.js source history) and may not apply cleanly to other branches or to the main development branch.

Finding the problem

The researcher started by looking at the definition of ExternalMemoryAccounter::Increase(). In C++, every function has a signature, which says what kind of value it expects. This one expects an unsigned size_t, meaning a whole number that cannot be negative. But in the zlib code path, it was being given a signed ssize_t, which can be negative. When a negative number is handed to something expecting only positive numbers, the result is nonsense, and in this case the report says it can cause a cleanup to start.

The report includes a simplified backtrace. A backtrace is the list of function calls that led to a crash or a problem, read from the innermost call outwards (or, as here, from the top down). It is like a stack of plates: each plate is a function that was running, and the backtrace shows the order.

Text
v8::internal::Heap::CollectAllGarbage
GC triggered by as negative integer passed to
v8::ExternalMemoryAccounter::Increase(v8::Isolate*, unsigned int)
called by
node::(anonymous namespace)::CompressionStream<node::(anonymous namespace)::ZlibContext>::Close()
during destruction of
node::(anonymous namespace)::ZlibStream::~ZlibStream
during an active GC
v8::internal::Heap::CollectGarbage

Reading it from the bottom up: a garbage collection (CollectGarbage) is already active. During that collection, V8 destroys native objects, which runs the destructor of ZlibStream (the ~ZlibStream notation means "the function that runs when this object is destroyed"). That destructor calls Close() on CompressionStream. Close() calls ExternalMemoryAccounter::Increase(). A negative integer is passed to it, and that triggers another garbage collection (CollectAllGarbage).

The chain is what makes it look wrong: a cleanup is already running, and from inside it another cleanup is started.

The researcher states that no proof of concept (PoC) was produced, because of limited experience with bug bounty work. A PoC is a small, reproducible example that demonstrates a bug. The researcher believes one is possible given these details. This was also their first security report.

Reproducing it

The reproduction is done with Docker containers. These are the steps exactly as given in the report.

Step 1: create and start the container

Bash
docker run -v -it --privileged termux/termux-docker:i686
docker container start <container_name>

docker run creates and starts a container from an image. -v and -it are options (the report shows them as written); --privileged gives the container extra permissions, which the next step needs. termux/termux-docker:i686 is the image name and the i686 variant. The second line starts an existing container by name, where <container_name> is a placeholder you replace with the name of the container you created.

Step 2: raise the PID limit

The report describes this as a workaround for bionic (the C library used on Android) not supporting process IDs greater than or equal to 2**16 on 32-bit architectures. A process ID (PID) is the number the operating system gives to each running program. On 32-bit systems the number of possible PIDs is limited, and this workaround raises the ceiling. Privileged containers are required for it.

Bash
docker exec --user root   -it "$container_id" bash -c "echo 32767 > /proc/sys/kernel/pid_max"

docker exec runs a command inside a running container. --user root runs it as the root (administrator) user. -it keeps it interactive. "$container_id" is the container identifier. bash -c runs the following string as a shell command. Inside the quotes, echo 32767 > /proc/sys/kernel/pid_max writes the number 32767 into a special file that controls the maximum PID value. The > symbol means "write into this file".

Step 3: start a shell as the system user

Bash
docker exec --user system -it "$container_id" bash

This opens an interactive shell (bash) inside the container, but as the system user rather than root. Running as a normal user is closer to how the software would be used in practice.

Step 4: install Node.js

Shell
pkg update
pkg install nodejs

pkg update refreshes the list of available packages. pkg install nodejs downloads and installs Node.js. After this, the debug builds attached to the report can be installed in the container to compare behaviour before and after the fix.

The report does not include a JavaScript trigger, a crashing input, or any output from the reproduction beyond the backtrace above.

Why it happens

The bug was introduced in a specific commit, [redacted]. A commit is a saved change in a source code history, like a version in a document's track changes. That commit was replacing deprecated calls to Isolate::AdjustAmountOfExternalAllocatedMemory. "Deprecated" means the old way still works but is discouraged and will eventually be removed.

During that replacement, ExternalMemoryAccounter::Increase() was called where ExternalMemoryAccounter::Update() was intended. During garbage collection, V8 destroys native objects. That runs the ZlibStream destructor, which calls Increase() instead of Update(). Increase() takes an unsigned size_t, but the value passed here is a signed ssize_t, so a negative value reaches the accounter and triggers a garbage collection from inside a garbage collection.

The report notes that ExternalMemoryAllocator::Update() and ExternalMemoryAllocator::Decrease() properly take care of not executing GC when memory is being released. In other words, the right functions already existed and already handled this case correctly. The report also says that checks exist in the V8 source tree to ensure GC inside GC does not happen, but that no high-level documentation of V8 internals was found to confirm the intended behaviour.

What it means in practice

As far as the researcher can tell, GC inside GC is not intended behaviour in V8. The known affected platforms are Android x86 and Android arm32. The bug could not be reproduced on other architectures or platforms, although the researcher believes it affects them too. No exploitation beyond the GC-inside-GC behaviour described in the backtrace is demonstrated in the report.

The suggested fix

The suggested patch changes the two call sites from ExternalMemoryAccounter::Increase() to ExternalMemoryAccounter::Update(), which the report says takes care of not executing GC when memory is being released. It was prepared for the v24.6.0 tag and may not apply cleanly elsewhere.

Diff
diff --git a/src/node_mem-inl.h b/src/node_mem-inl.h
index 06871d031d3..70d28dd524b 100644
--- a/src/node_mem-inl.h
+++ b/src/node_mem-inl.h
@@ -59,7 +59,7 @@ void* NgLibMemoryManager<Class, T>::ReallocImpl(void* ptr,
     // Environment*/Isolate* parameter and call the V8 method transparently.
     const int64_t new_size = size - previous_size;
     manager->IncreaseAllocatedSize(new_size);
-    manager->env()->external_memory_accounter()->Increase(
+    manager->env()->external_memory_accounter()->Update(
         manager->env()->isolate(), new_size);
     *reinterpret_cast<size_t*>(mem) = size;
     mem += sizeof(size_t);

This is a diff, a format that shows changes to a file. Lines starting with - are removed and lines starting with + are added. The file is src/node_mem-inl.h. The change is inside ReallocImpl, a function that resizes a memory block. new_size is calculated as the difference between the new size and the previous size. The old line called Increase() with that value; the new line calls Update(). The surrounding lines are context so you can see where the change sits.

Diff
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index c088c547539..b8617093bdf 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -644,7 +644,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
     if (report == 0) return;
     CHECK_IMPLIES(report < 0, zlib_memory_ >= static_cast<size_t>(-report));
     zlib_memory_ += report;
-    AsyncWrap::env()->external_memory_accounter()->Increase(
+    AsyncWrap::env()->external_memory_accounter()->Update(
         AsyncWrap::env()->isolate(), report);
   }

This second diff is in src/node_zlib.cc, inside the CompressionStream class. if (report == 0) return; means: if there is nothing to report, stop here. CHECK_IMPLIES(report < 0, zlib_memory_ >= static_cast<size_t>(-report)); is a safety check: if report is negative, then the tracked zlib_memory_ must be at least the absolute value of report, so the counter cannot go below zero. zlib_memory_ += report; updates the counter. Then the old line called Increase() with report, which can be negative; the new line calls Update() instead.

The patch showed no regression in test cases on Linux x64 and Android i686. "No regression" means the existing tests still passed, so the change did not break anything that was already working.

Other places worth testing

  1. Other Increase() call sites that receive a signed delta. Search the Node.js tree for external_memory_accounter()->Increase( and check whether the argument can be negative. A positive result is a call reached from a destructor or from a path that runs during GC.
  2. Other NgLibMemoryManager users. The ReallocImpl change covers every class built on that template. Exercise realloc paths that shrink buffers, for example by driving a native module that reallocates downward, and watch for a GC starting while another GC is active.
  3. 32-bit builds on other platforms. The report only confirms Android x86 and arm32. Build Node.js for another 32-bit target, run the zlib test suite, and look for the same GC-inside-GC backtrace.
  4. Zlib stream teardown under memory pressure. Create and destroy many compression and decompression streams while the heap is close to its limit, so that the destructor path runs during a collection. A positive result is the CollectAllGarbage frame appearing beneath ZlibStream::~ZlibStream in a stack trace.
  5. Debug builds with V8 GC checks enabled. Run the debug Node.js build from the report against the zlib tests. A positive result is an assertion or check failure in V8's GC re-entry guards rather than a silent double collection.

Glossary

  • Node.js: a program that runs JavaScript outside a browser, commonly on servers.
  • V8: the JavaScript engine that runs JavaScript code, also used by Google Chrome.
  • Garbage collection (GC): the automatic process of finding and freeing memory that is no longer in use.
  • Heap: the area of memory where a program's objects are stored and managed.
  • Native object: an object created by C++ code rather than by JavaScript.
  • External memory: memory used by native code that V8 does not manage directly but is told about.
  • ExternalMemoryAccounter: the bookkeeping object that records how much external memory is in use, so V8 can decide when to collect.
  • Increase() / Decrease() / Update(): the three operations on that bookkeeping object; adding memory can trigger a collection, releasing memory should not.
  • size_t: an unsigned whole-number type in C++, which cannot be negative.
  • ssize_t: a signed whole-number type in C++, which can be negative.
  • Signed / unsigned: whether a number type can hold negative values (signed) or only zero and positive values (unsigned).
  • Destructor: the function that runs automatically when an object is destroyed; written with a leading ~ in C++.
  • Backtrace: the list of function calls that led to a crash or problem.
  • Commit: a saved change in a source code history.
  • Deprecated: still working but discouraged, usually because it will be removed.
  • Patch / diff: a proposed change to source code, shown as removed and added lines.
  • Regression: a break in something that used to work.
  • Proof of concept (PoC): a small, reproducible example that demonstrates a bug.
  • Docker: a tool for running small, self-contained computers (containers) inside your computer.
  • Container: an isolated environment with its own software, created from an image.
  • Image: a saved template from which containers are created.
  • Privileged container: a container given extra permissions, close to those of the host system.
  • Termux: a project that provides Linux-style tools on Android.
  • i686: a 32-bit Intel-compatible processor architecture.
  • ARM / arm32: a processor family common in phones; arm32 is its 32-bit variant.
  • qemu-binfmt: software that lets a computer run programs built for a different processor architecture.
  • Bionic: the C library used on Android.
  • PID: the number the operating system gives to each running process.
  • .deb: the installation file format used by Debian-based systems, including Termux.
  • apt / pkg: package installers that download and install software.
  • zlib: the compression library used by Node.js for compressing and decompressing data.
  • ZlibStream / CompressionStream: the Node.js classes that manage compression and decompression streams.
  • Template: a C++ feature that lets one piece of code work with many types; NgLibMemoryManager is one.
  • ReallocImpl: the function that resizes a memory block.
  • Assertion / check: a test inside the code that stops the program if something impossible happens.

More from Node.js

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.