Bug 277734
| Summary: | [WTF] Open files with O_CLOEXEC by default to avoid file handles leak | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Olivier Blin <olivier.blin> |
| Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | aperez, cdumez, cgarcia, darin, don.olmstead, fujii.hironori, mcatanzaro, ross.kirsling, sihui_liu, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Olivier Blin
FileSystemPOSIX opens files without the O_CLOEXEC file in openFile() and openTemporaryFile().
This can cause file handles to be leaked to subprocess.
For example, if the UIProcess opens content rules files from the ContentRuleListStore class between the NetworkProcess is spawned, the content rules file handles are leaked to the NetworkProcess.
It does not seem useful to open files without O_CLOEXEC.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Olivier Blin
Pull request: https://github.com/WebKit/WebKit/pull/31831
Radar WebKit Bug Importer
<rdar://problem/133836848>
EWS
Committed 284612@main (12930853a9a4): <https://commits.webkit.org/284612@main>
Reviewed commits have been landed. Closing PR #31831 and removing active labels.