Summary: | [PRIVACY VIOLATION] plasma-browser-integration-host creates network connections | ||
---|---|---|---|
Product: | [Plasma] plasma-browser-integration | Reporter: | Stefan Becker <chemobejk> |
Component: | Firefox | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | fabian, rdieter, sowieso |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
URL: | https://bugzilla.mozilla.org/show_bug.cgi?id=1452461 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch with improved workaround |
Description
Stefan Becker
2018-10-06 16:05:20 UTC
It's a bug in firefox, it doesn't use O_CLOEXEC so the FDs get inherited by the host process. Nothing we can fix ourselves and all other native extensions are affected as well. Workaround: https://phabricator.kde.org/D15984 As recommended I filed a bug upstream https://bugzilla.mozilla.org/show_bug.cgi?id=1496991 After applying the workaround and restarting Firefox I do not see any "outgoing network connections" by plasma-browser-integration-host anymore. Thanks Unfortunately the workaround has a nasty side-effect: firefox starts to busy-loop :-( I guess there are some FDs that firefox is using to communicate with the host binary and those should not be closed. Created attachment 115453 [details]
Patch with improved workaround
I poked around in the workaround code and figured out that the only way to avoid Firefox to busy loop is to *only* close() sockets and leave the rest alone. Thus we still have leaked file descriptors lying around, but at least we're getting rid of all leaked network connections at start.
Hm, that might be because the leaked FD has some weird behaviour. Flags (like O_NONBLOCK) are shared with the parent, so it's not too unlikely that closing a pipe can cause some unexpected behaviour. The only correct behaviour here is not to close anything, really. I would prefer to not have any kind of workaround for this broken browser behaviour in our code, especially if that workaround has to contain hacks. It doesn't even change any kind of behaviour, it just makes the netstat output cleaner. Let's see what kbroulik thinks about this. My Mozilla bug got marked as duplicate *** Bug 418907 has been marked as a duplicate of this bug. *** |