The Wire · Showcase
NODE CRASHES ON ODD-LENGTH HEX STRINGS VIA WRITEV
By RepoJournal · Filed · About Node.js
A critical crash in Node's binary handling when writing hex strings through Writev is now fixed, along with three other stability improvements shipping across the runtime.
The most urgent fix addresses a fatal CHECK that crashed the process when hex-encoded strings with an odd number of characters were written through Writev, which is automatically triggered by HTTP request corking [1]. The same operation via single Write calls did not crash because StringBytes::Write delegates to HexDecode and silently drops the trailing incomplete nibble; the fix removes the CHECK and lets integer division handle odd lengths consistently. Alongside this, crypto error handling got a user-facing upgrade when output encoding changes between Cipher or Decipher calls [2], replacing internal assertions with proper ERR_INVALID_ARG_VALUE exceptions. A segmentation fault in the SQLite session handling has been sealed [3], preventing crashes when a database wasn't kept alive during an active session. ModuleHooks now implements Symbol.dispose as an alias for deregister [4], making registerHooks work with the using keyword for better resource cleanup patterns.
One email a day. Unsubscribe in one click.
Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull the latest node/node commits if you use Writev or handle hex strings in production nodejs/node [immediate]
- → Review any crypto code using changing output encodings across Cipher/Decipher calls nodejs/node [plan]
- → Monitor nodejs.org CI changesets integration for documentation workflow impact nodejs/nodejs.org [monitor]
References
- [1] src: fix crash when writing odd-length hex string via Writev nodejs/node
- [2] crypto: use user-facing error for output encoding changes nodejs/node
- [3] sqlite: keep database alive while a session is open ↗ nodejs/node
- [4] module: implement Symbol.dispose in ModuleHooks ↗ nodejs/node