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 FrameworkAssignee: 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
Reported 2024-08-07 06:12:37 PDT
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
Olivier Blin
Comment 1 2024-08-07 06:14:45 PDT
Radar WebKit Bug Importer
Comment 2 2024-08-14 06:13:15 PDT
EWS
Comment 3 2024-10-03 09:01:43 PDT
Committed 284612@main (12930853a9a4): <https://commits.webkit.org/284612@main> Reviewed commits have been landed. Closing PR #31831 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.