René's URL Explorer Experiment


Title: permission: process.permission.drop() aborts (SIGABRT) when two --allow-fs-read grants collide at their first wildcard · Issue #66901 · nodejs/node · GitHub

Open Graph Title: permission: process.permission.drop() aborts (SIGABRT) when two --allow-fs-read grants collide at their first wildcard · Issue #66901 · nodejs/node

X Title: permission: process.permission.drop() aborts (SIGABRT) when two --allow-fs-read grants collide at their first wildcard · Issue #66901 · nodejs/node

Description: Version v26.12.0 Platform Windows 11 x64. The code path is platform independent, so Linux and macOS are expected to behave the same. Subsystem permission What steps will reproduce the bug? Two --allow-fs-read grants whose text is identic...

Open Graph Description: Version v26.12.0 Platform Windows 11 x64. The code path is platform independent, so Linux and macOS are expected to behave the same. Subsystem permission What steps will reproduce the bug? Two --al...

X Description: Version v26.12.0 Platform Windows 11 x64. The code path is platform independent, so Linux and macOS are expected to behave the same. Subsystem permission What steps will reproduce the bug? Two --al...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"permission: process.permission.drop() aborts (SIGABRT) when two --allow-fs-read grants collide at their first wildcard","articleBody":"### Version\n\nv26.12.0\n\n### Platform\n\nWindows 11 x64. The code path is platform independent, so Linux and macOS are expected to behave the same.\n\n### Subsystem\n\npermission\n\n### What steps will reproduce the bug?\n\nTwo `--allow-fs-read` grants whose text is identical up to and including the first `*`, plus any `process.permission.drop()` call, abort the process.\n\n```sh\nmkdir -p /tmp/sig\ncat > /tmp/sig/app.js \u003c\u003c'EOF'\nprocess.permission.drop('fs.read', process.argv[1]);\nconsole.log('survived');\nEOF\n\nnode --permission \\\n  --allow-fs-read='/tmp/sig/*' \\\n  --allow-fs-read='/tmp/sig/*.js' \\\n  /tmp/sig/app.js\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time, given both conditions:\n\n1. two `--allow-fs-read` grants identical up to and including their first `*`, and\n2. any `process.permission.drop('fs.read', ...)` call.\n\nStartup on its own is fine. Measured controls:\n\n| configuration | exit code |\n| --- | --- |\n| two colliding grants, no `drop()` | 0 |\n| two colliding grants + `drop(entrypoint)` | **134** |\n| single grant + `drop(entrypoint)` | 0 |\n| two colliding grants + `drop()` on an unrelated path | 0 |\n| two non-colliding grants + `drop(entrypoint)` | 0 |\n| collision on the `--allow-fs-write` list + `drop('fs.read', ...)` | 0 |\n\nThe last row is consistent with only the dropped scope's tree being replayed. v22.23.3 is unaffected because `process.permission.drop` does not exist on that line.\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`process.permission.drop()` should either drop the requested scope or throw a catchable error. It should not abort the process.\n\nThe grant combination is a reasonable thing to write. The permission documentation encourages wildcard grants and states that characters after a `*` are ignored, so `--allow-fs-read='/tmp/*' --allow-fs-read='/tmp/*.js'` reads as redundant but harmless rather than fatal, and nothing indicates it becomes fatal once the application calls `drop()`.\n\n### What do you see instead?\n\n`SIGABRT`, exit code 134:\n\n```\nAssertion failed: !path_prefix.empty()\n  at src/permission/fs_permission.h:62\n  in node::permission::FSPermission::RadixTree::Node::CreateChild(std::string_view)\n\n----- JavaScript stack trace -----\n1: drop (node:internal/process/permission:66:16)\n2: /tmp/sig/app.js:1:20\n```\n\n`CHECK` is unconditional in release builds, so application code cannot catch this. A process that drops privileges after startup, which is the intended use of the API, terminates.\n\n### Additional information\n\n**Why startup is safe but `drop()` is not.**\n\n`FSPermission::GrantAccess` only inserts a path when `!Lookup(path)`. `/tmp/sig/*.js` is already covered by `/tmp/sig/*`, so the colliding insert never happens while the flags are applied and the tree is built correctly.\n\nCommit 02bae370c (\"permission: keep explicit fs grants when dropping a covering directory\", 2026-10-13) moved the `granted_paths_` `push_back` out of that `!Lookup(path)` branch so every explicit grant is recorded even when covered. `RebuildTree` then replays the whole recorded list unconditionally, so the first `drop()` inserts both colliding grants into a fresh tree and `CreateChild` trips its own `CHECK`. That makes this a regression introduced alongside the grant-retention change rather than longstanding behaviour.\n\n**Where it aborts.**\n\n`Node::CreateChild` reaches `CHECK(!path_prefix.empty())` when the remaining prefix is empty, which happens when the second grant diverges only after a `*` that both grants share. Since `Lookup` never descends into a `wildcard_child`, the subtree being built past the first `*` is unreachable to lookups, so the insert that aborts appears to be doing no useful work.\n\n**Possible directions**, offered as context rather than as a tested patch, since the right choice interacts with how `granted_paths_` is replayed: either skip insertion once a wildcard has been consumed, given that everything after the first `*` is ignored by lookups, or have `CreateChild` return early on an empty `path_prefix` instead of asserting.\n\nI considered whether this belonged in the security process and concluded it does not: it requires in-process application code to call `drop()`, and it does not meet the denial-of-service criteria in the threat model, which require the behaviour to be directly exploitable by an untrusted source without application mistakes. Filing publicly on that basis. Happy to move it if maintainers see it differently.\n\n`process.permission.drop` is documented as Stability 1.1 - Active Development.\n","author":{"url":"https://github.com/itxcrusher","@type":"Person","name":"itxcrusher"},"datePublished":"2026-10-21T14:33:26Z","url":"https://github.com/nodejs/node/issues/66901"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4ad3cf35-a0c2-cc88-030e-709860d796eb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC892:197704:B6054C:ED00A1:6AED4606
html-safe-nonce709917b4843ccd1d22cbd26e577f0acfe8f1a98f24fbf7079aac57cb45964b3e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODkyOjE5NzcwNDpCNjA1NEM6RUQwMEExOjZBRUQ0NjA2IiwidmlzaXRvcl9pZCI6IjYxMTU3MjQ3MTMzNDM2NjU2NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfa7a33084a39c85d2da1993af5e8bc5938ab82083cb8ce0538f9b66b3be583b6
hovercard-subject-tagissue:5962570273
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/66901/issue_layout
twitter:imagehttps://opengraph.githubassets.com/62166c9f6442b0897da47022c0741a9ec2dd0024d2e88374fc77a7fb89e87e7d/nodejs/node/issues/66901
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/62166c9f6442b0897da47022c0741a9ec2dd0024d2e88374fc77a7fb89e87e7d/nodejs/node/issues/66901
og:image:altVersion v26.12.0 Platform Windows 11 x64. The code path is platform independent, so Linux and macOS are expected to behave the same. Subsystem permission What steps will reproduce the bug? Two --al...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameitxcrusher
hostnamegithub.com
expected-hostnamegithub.com
None56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11
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
release9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66901#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66901
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%2F66901
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/66901
Reloadhttps://github.com/nodejs/node/issues/66901
Reloadhttps://github.com/nodejs/node/issues/66901
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues655 (655)https://github.com/nodejs/node/issues
Pull requests663 (663)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/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66901
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66901
#66929https://github.com/nodejs/node/pull/66929
permission: process.permission.drop() aborts (SIGABRT) when two --allow-fs-read grants collide at their first wildcardhttps://github.com/nodejs/node/issues/66901#top
#66929https://github.com/nodejs/node/pull/66929
https://github.com/itxcrusher
itxcrusherhttps://github.com/itxcrusher
on Oct 21, 2026https://github.com/nodejs/node/issues/66901#issue-5962570273
02bae37https://github.com/nodejs/node/commit/02bae370c1618609aa17bb8b29e0a749f8a042e5
https://github.com/nhinata
nhinatahttps://github.com/nhinata
on Oct 22, 2026https://github.com/nodejs/node/issues/66901#issuecomment-6329676428
permission: keep explicit fs grants when dropping a covering directory #66556https://github.com/nodejs/node/pull/66556
https://github.com/itxcrusher
itxcrusherhttps://github.com/itxcrusher
on Oct 22, 2026https://github.com/nodejs/node/issues/66901#issuecomment-6334314753
#66556https://github.com/nodejs/node/pull/66556
#66556https://github.com/nodejs/node/pull/66556
#66556https://github.com/nodejs/node/pull/66556
itxcrusherhttps://github.com/itxcrusher
on Oct 22, 2026https://github.com/nodejs/node/issues/66901#event-33964671831
permission: make inserting an already-granted path idempotenthttps://github.com/itxcrusher/node/commit/18c9de5b8b20ec8977a947e44a545d9d78cc6c81
18c9de5https://github.com/itxcrusher/node/commit/18c9de5b8b20ec8977a947e44a545d9d78cc6c81
permission: make inserting an already-granted path idempotenthttps://github.com/itxcrusher/node/commit/146b9d2ea426b641724b89591255628ab8360f9c
146b9d2https://github.com/itxcrusher/node/commit/146b9d2ea426b641724b89591255628ab8360f9c
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66901
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66901
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

Viewport: width=device-width


URLs of crawlers that visited me.