René's URL Explorer Experiment


Title: net: onread can modify buffers made immutable after registration · Issue #67397 · nodejs/node · GitHub

Open Graph Title: net: onread can modify buffers made immutable after registration · Issue #67397 · nodejs/node

X Title: net: onread can modify buffers made immutable after registration · Issue #67397 · nodejs/node

Description: Version v28.0.0-pre Platform macos 26.6.2, arm64 (darwin 25.6.0) Subsystem net What steps will reproduce the bug? save this as repro.cjs and run with: ./node --js-immutable-arraybuffer repro.cjs const net = require('node:net'); const ser...

Open Graph Description: Version v28.0.0-pre Platform macos 26.6.2, arm64 (darwin 25.6.0) Subsystem net What steps will reproduce the bug? save this as repro.cjs and run with: ./node --js-immutable-arraybuffer repro.cjs co...

X Description: Version v28.0.0-pre Platform macos 26.6.2, arm64 (darwin 25.6.0) Subsystem net What steps will reproduce the bug? save this as repro.cjs and run with: ./node --js-immutable-arraybuffer repro.cjs co...

Opengraph URL: https://github.com/nodejs/node/issues/67397

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"net: onread can modify buffers made immutable after registration","articleBody":"### Version\n\nv28.0.0-pre\n\n### Platform\n\n```text\nmacos 26.6.2, arm64 (darwin 25.6.0)\n```\n\n### Subsystem\n\nnet\n\n### What steps will reproduce the bug?\n\nsave this as repro.cjs and run with:\n\n```sh\n./node --js-immutable-arraybuffer repro.cjs\n```\n\n```js\nconst net = require('node:net');\n\nconst server = net.createServer((socket) => socket.end('test'));\nserver.listen(0, '127.0.0.1', () => {\n  const buffer = new Uint8Array(4);\n  let immutable;\n  const socket = net.connect({\n    host: '127.0.0.1',\n    port: server.address().port,\n    onread: {\n      buffer,\n      callback(nread) {\n        console.log('bytes read:', nread);\n        console.log('old view length:', buffer.byteLength);\n        console.log('immutable:', immutable.immutable);\n        console.log('after:', [...new Uint8Array(immutable)]);\n        socket.end();\n      },\n    },\n  });\n  socket.on('close', () => server.close());\n  immutable = buffer.buffer.transferToImmutable();\n  console.log('before:', [...new Uint8Array(immutable)]);\n});\n```\n\n### How often does it reproduce? Is there a required condition?\n\nalways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nafter transferToImmutable() succeeds, incoming data must not change\nthe returned arraybuffer's bytes.\n\n### What do you see instead?\n\n```text\nbefore: [ 0, 0, 0, 0 ]\nbytes read: 4\nold view length: 0\nimmutable: true\nafter: [ 116, 101, 115, 116 ]\n```\n\nthe old view is detached, but incoming data still changes the new\nimmutable arraybuffer.\n\n### Additional information\n\ni found this while working on #67394. that pr checks buffers when they\nare supplied, so it doesn't catch a transfer after registration.\n\nthe native listener keeps using the cached address:\n[UseUserBuffer](https://github.com/nodejs/node/blob/2aef805afe091f0c6e28b756cf85b97b8b6ab87f/src/stream_base.cc#L162)\n[OnStreamAlloc](https://github.com/nodejs/node/blob/2aef805afe091f0c6e28b756cf85b97b8b6ab87f/src/stream_base.cc#L769)\n\nrelated: #66346\n\ni'm planning to work on a fix.","author":{"url":"https://github.com/fatihguzeldev","@type":"Person","name":"fatihguzeldev"},"datePublished":"2026-11-10T22:00:44Z","url":"https://github.com/nodejs/node/issues/67397"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5fbd90f2-b815-de26-49dc-ad823f9fc142
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id832A:3CBF9:72C0B5:943F1D:6B0626BC
html-safe-nonce1edd16a8aa12fe059d5143b4b14543d9e18c3908af0c8f38252deec56a40e14f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzJBOjNDQkY5OjcyQzBCNTo5NDNGMUQ6NkIwNjI2QkMiLCJ2aXNpdG9yX2lkIjoiNDUzOTQwMDY4OTgzOTEyMjEwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf275b2ab8be00350dd766f24d6469831f8996d916c1f36278a65355cc92dd9aa
hovercard-subject-tagissue:6316740055
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/67397/issue_layout
twitter:imagehttps://opengraph.githubassets.com/47b0da639c2d4d71edfd1b421a099335817cb0284f95a70ce7ee2a35b7970bc7/nodejs/node/issues/67397
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/47b0da639c2d4d71edfd1b421a099335817cb0284f95a70ce7ee2a35b7970bc7/nodejs/node/issues/67397
og:image:altVersion v28.0.0-pre Platform macos 26.6.2, arm64 (darwin 25.6.0) Subsystem net What steps will reproduce the bug? save this as repro.cjs and run with: ./node --js-immutable-arraybuffer repro.cjs co...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefatihguzeldev
hostnamegithub.com
expected-hostnamegithub.com
None9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release32e57d5cc2ce6ce92ec6dceb65858344750c27c2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/67397#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67397
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67397
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/67397
Reloadhttps://github.com/nodejs/node/issues/67397
Reloadhttps://github.com/nodejs/node/issues/67397
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues630 (630)https://github.com/nodejs/node/issues
Pull requests660 (660)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/insights
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67397
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67397
#67407https://github.com/nodejs/node/pull/67407
net: onread can modify buffers made immutable after registrationhttps://github.com/nodejs/node/issues/67397#top
#67407https://github.com/nodejs/node/pull/67407
https://github.com/fatihguzeldev
fatihguzeldevhttps://github.com/fatihguzeldev
on Nov 10, 2026https://github.com/nodejs/node/issues/67397#issue-6316740055
#67394https://github.com/nodejs/node/pull/67394
UseUserBufferhttps://github.com/nodejs/node/blob/2aef805afe091f0c6e28b756cf85b97b8b6ab87f/src/stream_base.cc#L162
OnStreamAllochttps://github.com/nodejs/node/blob/2aef805afe091f0c6e28b756cf85b97b8b6ab87f/src/stream_base.cc#L769
#66346https://github.com/nodejs/node/issues/66346
fatihguzeldevhttps://github.com/fatihguzeldev
on Nov 21, 2026https://github.com/nodejs/node/issues/67397#event-36888978683
net: validate onread buffers before each readhttps://github.com/fatihguzeldev/node/commit/615c24cba82c82d0b793033ce43d30599bd319e3
615c24chttps://github.com/fatihguzeldev/node/commit/615c24cba82c82d0b793033ce43d30599bd319e3
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#67407https://github.com/nodejs/node/pull/67407
on Nov 22, 2026https://github.com/nodejs/node/issues/67397#event-36919895093
Renegade334https://github.com/Renegade334
on Nov 22, 2026https://github.com/nodejs/node/issues/67397#event-36922635118
net: validate onread buffers before each readhttps://github.com/Renegade334/node/commit/d53c5810abeb325ad2e45869bdd5e35627ee3ba8
d53c581https://github.com/Renegade334/node/commit/d53c5810abeb325ad2e45869bdd5e35627ee3ba8
aduh95https://github.com/aduh95
on Nov 23, 2026https://github.com/nodejs/node/issues/67397#event-37001796705
net: validate onread buffers before each readhttps://github.com/nodejs/node/commit/38d063ed3ed3ab78fbb7ad920591f6018dcaa8c5
38d063ehttps://github.com/nodejs/node/commit/38d063ed3ed3ab78fbb7ad920591f6018dcaa8c5
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/67397
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67397
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.