Repository navigation
fix: enforce File System Access .git/hooks write block and hypervisor UNC shares (43-x-y) - #55331
Conversation
|
The latest run on 5117020 (after rebasing onto 43-x-y with the ICU fix) (40400560155) had three red jobs on its first attempt, none caused by this PR. I re-ran the failed jobs once; two went green and lint is still red from the same rate limit:
All other jobs passed on the first attempt, including every Windows and macOS test shard. nn-test: "Run Node.js Tests" passed ( UNC spec: the Windows-only "applies Chrome's local UNC path rules" spec in Generated by Claude Code |
|
Release note looks good now. |
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. It changes the File System Access blocklist, which decides what pages may read and write on disk, so a human should still check it against Chromium at this branch's version.
What was reviewed (from a standalone clone, so I couldn't see upstream //chrome code):
- The suffix-rule loop in
ShouldBlockAccessToPath: it searches path components case-insensitively, rebuilds the path from the root to the end of each match, and checks every match. - The new
kBlockWritecheck is insideshould_block_with_rule, so it covers the regular and extra rules as well as the suffix rules. Please confirm this matches upstream for any non-suffixkBlockWriterules. IsLocalUNCServer(strips one trailing dot, then compares case-insensitively), theUserActionplumbing through both blocklist-check paths, and the new read-only.git/hooksspec.
Extended reasoning...
The change touches shell/browser/file_system_access/file_system_access_permission_context.cc and its header, plus one spec in spec/chromium.spec.ts. It changes how the File System Access blocklist decides access: suffix rules are now enforced, more UNC server names count as local, and kBlockWrite rules are limited to the save picker. That blocklist is a permission boundary between web content and the local filesystem. The intended behaviour depends on upstream Chromium code that this standalone checkout doesn't contain, and the save-picker and UNC paths can't be exercised by the added spec. Because of that security surface, I'm deferring to a human instead of approving.
… shares Electron's copy of ShouldBlockAccessToPath() never consulted suffix_block_path_rules_, so Chrome's Windows-only kBlockWrite rule for */.git/hooks was not enforced. Match Chrome's matcher at this branch's Chromium version: plumb the UserAction into the blocklist check, apply kBlockWrite rules only for UserAction::kSave, and evaluate suffix rules. Suffix components are compared case-insensitively, as Chrome does since crrev.com/c/8376681, because the rule targets Windows' case-insensitive file system. Also port IsLocalUNCServer() so that hypervisor host-share UNC servers (\\Mac, \\psf, \\vmware-host, \\.host, \\vboxsvr, \\vboxsrv) and trailing-dot server names are treated as local UNC paths on Windows. Upstream: - https://chromium-review.googlesource.com/c/chromium/src/+/8376681 - https://chromium-review.googlesource.com/c/chromium/src/+/8424981 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MtuMgvwAcw7t9Q6HEB31Vx
…klist Shares a fixture directory over loopback SMB and pastes it under different UNC server and share names, checking that local server names (127.0.0.1, and a trailing-dot localhost when it resolves) and shares ending in '$', including drive admin shares, are blocked while other servers are not. The trailing-dot case pins down the intentional change from Electron's previous matcher. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MtuMgvwAcw7t9Q6HEB31Vx
705b2b4 to
5117020
Compare
|
Release Notes Persisted
|
Electron 43.8.4 updates its embedded Node.js to the v24.22.1 security release (electron/electron#55161). The app and Setup's portable runtime now run the same Node. Electron 43.8.4 also fixes: - a macOS File System Access blocklist bypass (electron/electron#54677); - further blocklist gaps (electron/electron#55331); - asar handling (electron/electron#55179, electron/electron#55185); - tzdata, updated to 2026e (electron/electron#55336). OpenSSL 3.5.9 reaches only Setup's runtime, because Electron's Node uses BoringSSL. - Every Electron pin moves from 43.8.3 to 43.8.4: package.json, the lockfile, the three release input profiles, the Windows pin constant, the linux-inputs hash in the AppImage and DEB contracts, tests and docs. ABI stays 148. - The package's checksums.json matches the official SHASUMS256.txt (75/75), and #363 enforces it at build time. The binary, releases.json and Electron's DEPS all report Node 24.22.1 with ABI 148. src/api/hooks.cc is unchanged since Node 24.22.0, so the #135 fix still comes from upstream Node. - Electron 43.8.4's Linux zips store most files as 0666 or 0777, and so do 44.10.0's and 45.1.0's; the packager keeps stored modes. The Linux thin-app builder now clears group and other write on Electron's extracted files, never through a symlink. This restores 43.8.3's modes exactly. - The AppImage's final verifier now refuses any regular file other than the sandbox that isn't 0644 or 0755. The DEB's verifier already did. Follow-up: #378 (mode gates in the thin-folder verifiers). Closes #371 Co-authored-by: Copilot <[email protected]> Copilot-Session: 9e7ec7a7-8690-49e5-9d55-492fedc3027a
This is the 43-x-y counterpart of #55328. Electron's own copy of Chrome's File System Access path matcher never checked the suffix rules, so Chrome's
kBlockWriterule for.git/hookswas not enforced, and it did not treat the hypervisor host-share UNC servers (mac,psf,vmware-host,.host,vboxsvr,vboxsrv) or trailing-dot server names as local. Unlike main, which switches Electron to upstream's matcher, this branch keeps Electron's own matcher and makes the smaller change of adding the missing checks. Following CL 8376681, suffix components are compared case-insensitively, and the UNC server handling follows CL 8424981. At this branch's Chromium version upstream applies the.git/hookswrite block only to the save picker (UserAction::kSave), and the rule is Windows-only, so the practical effect here is the Windows save picker plus UNC paths. A new spec inspec/chromium.spec.tschecks that reading.git/hooksstays allowed, since the save picker cannot be driven from tests.🤖 Generated with Claude Code
https://claude.ai/code/session_01MtuMgvwAcw7t9Q6HEB31Vx
Generated by Claude Code
Notes: Fixed File System Access blocklist gaps for
.git/hookswrites and hypervisor UNC shares.