pipewire/src/modules
Barnabás Pőcze 1d4551a98d pipewire: module-protocol-native: avoid file descriptor leaks
At the moment, file descriptors may be leaked
due to a malicious/buggy client:

1. If the control messages have been truncated, some file descriptors
   may still have been successfully transferred. Currently, seeing
   the MSG_CTRUNC bit causes `refill_buffer()` to immediately return
   -EPROTO without doing anything with the control messages, which
   may contain file descriptors.

2. When there is no truncation, it is still possible that the current
   batch of file descriptors causes the total file descriptor count
   to go over the maximum number of fds for the given buffer (currently 1024).
   In this case, too, `refill_buffer()` immediately returns -EPROTO
   without closing the file descriptors that can not be saved.

Fix both of these cases by closing all file descriptors in all
remaining cmsgs when one of the mentioned conditions occur.
2022-01-17 18:00:48 +01:00
..
module-adapter modules: switch more modules to the new property helpers 2021-10-13 07:12:00 +00:00
module-client-device tree-wide: replace strstr(a, b) == a with spa_strstartswith() 2021-08-02 08:24:21 +00:00
module-client-node make some warnings into log 2021-12-07 10:19:10 +01:00
module-echo-cancel module-echo-cancel: Remove intelligibility param with no effect 2021-11-11 16:52:58 +00:00
module-filter-chain filter-chain: improve lv2 support 2021-12-29 17:17:17 +01:00
module-metadata includes: update all references to extensions to point to pipewire/extensions 2021-06-18 17:54:18 +03:00
module-profiler modules: use the new topic-based logging from various pipewire modules 2021-09-28 09:35:39 +02:00
module-protocol-native pipewire: module-protocol-native: avoid file descriptor leaks 2022-01-17 18:00:48 +01:00
module-protocol-pulse pulse-server: use object serial as index 2022-01-17 12:48:31 +01:00
module-raop raop: fix errno check 2022-01-12 10:11:00 +01:00
module-session-manager Revert "global: don't reuse ids" 2022-01-17 12:12:54 +01:00
module-zeroconf-discover pipewire: module-zeroconf-discover: free correct pointer 2021-06-16 17:39:25 +00:00
spa context: pass quantum_limit when loading plugins 2022-01-12 17:47:58 +01:00
meson.build treewide: meson.build: simplify get_variable() calls 2022-01-17 08:28:53 +00:00
module-access.c module-access: improve pipewire.client.access handling 2021-11-16 17:27:05 +01:00
module-adapter.c modules: switch more modules to the new property helpers 2021-10-13 07:12:00 +00:00
module-client-device.c modules: check for a NULL resource in client-device and client-node 2021-11-19 09:58:49 +10:00
module-client-node.c modules: check for a NULL resource in client-device and client-node 2021-11-19 09:58:49 +10:00
module-echo-cancel.c Revert "module-echo-cancel: schedule source and playback last" 2021-12-14 16:52:16 +01:00
module-example-sink.c modules: switch more modules to the new property helpers 2021-10-13 07:12:00 +00:00
module-example-source.c modules: switch more modules to the new property helpers 2021-10-13 07:12:00 +00:00
module-filter-chain.c filter-chain: also allow control params with index 2022-01-07 16:37:45 +01:00
module-link-factory.c link-factory: avoid using 0 for invalid id 2021-10-18 11:35:25 +02:00
module-loopback.c module-loopback: align stream media names to filter-chain 2022-01-03 13:14:29 +01:00
module-metadata.c modules: use the new topic-based logging from various pipewire modules 2021-09-28 09:35:39 +02:00
module-portal.c modules: switch to new property helpers 2021-10-13 07:12:00 +00:00
module-profiler.c add some more properties to globals 2022-01-17 12:18:07 +01:00
module-protocol-native.c protocol-native: change some warnings to infos 2021-12-14 14:54:13 +00:00
module-protocol-pulse.c modules: add log topics to module-protocol-pulse 2021-09-28 09:35:39 +02:00
module-protocol-simple.c pipewire: module-protocol-simple: fix inet_ntop() call 2022-01-13 13:36:04 +01:00
module-pulse-tunnel.c pulse-server: list NETWORK flag on devices 2021-10-14 13:45:58 +02:00
module-raop-discover.c module-raop: fix zeroconf copy and paste 2021-12-13 11:31:23 +01:00
module-raop-sink.c module-raop-sink.c: Fix compilation error on FreeBSD. 2021-12-26 17:43:17 +03:00
module-roc-sink.c pulse-server: list NETWORK flag on devices 2021-10-14 13:45:58 +02:00
module-roc-source.c pulse-server: list NETWORK flag on devices 2021-10-14 13:45:58 +02:00
module-rt.c module-rt: Default RLIMIT_RTTIME to -1/unlimited 2022-01-17 14:10:44 +00:00
module-session-manager.c doc: add the documentation infrastructure for pipewire modules 2021-06-25 08:42:24 +00:00
module-zeroconf-discover.c pulse-server: use safer spa_scnprintf 2021-12-22 21:34:29 +01:00