pipewire/spa/plugins
Wim Taymans f93b3b23a3 loop: fix use after free case
Because we can now destroy sources (and free the source structure) by
simply holding the lock, there is a window where we might access the
freed source.

When we in iterate release the lock and go into the epoll, another
thread might acquire the lock and delete the fd from epoll. This might
happen right after epoll detected activity on the fd. When iterate
manages to acquire the lock again, it will process to dispatch the
active fd and deref the ep.data pointer, which is now pointing to freed
memory.

Fix this by incrementing a removed_count whenever we remove a source.
Check the counter if it was the same as before the epoll otherwise we
can't assume all sources are alive still. Return in that case as if
there were no fds to poll. The caller should reenter the iterate at some
point and we will return all the fds with activity, minus the one that
got destroyed. We need to give control to the caller because part of the
removal could be to stop the loop iteration all together.
2025-06-30 12:44:15 +02:00
..
aec spa: aec: Add support for webrtc-audio-processing-2 2025-01-09 12:06:58 +00:00
alsa Revert "alsa: add Teufel Cage Pro mapping" 2025-06-26 09:19:09 +00:00
audioconvert audioconvert: remove unused field 2025-06-25 10:37:56 +02:00
audiomixer loop: add method to run a function with the lock 2025-05-29 10:17:16 +02:00
audiotestsrc loop: add method to run a function with the lock 2025-05-29 10:17:16 +02:00
avb *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
bluez5 bluez5: drop old SCO fragment data when sink starts 2025-06-21 16:13:57 +03:00
control loop: add method to run a function with the lock 2025-05-29 10:17:16 +02:00
ffmpeg spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
filter-graph filter-graph: compare with float to avoid conversion 2025-06-24 13:46:30 +02:00
jack *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
libcamera libcamera: Default to auto-focus & auto-exposure 2025-06-11 13:56:26 +00:00
support loop: fix use after free case 2025-06-30 12:44:15 +02:00
test spa: make the wave, pattern and ditherType Int 2025-06-13 10:06:09 +02:00
v4l2 spa: v4l2: add colorimetry support 2025-06-27 12:57:01 +00:00
videoconvert spa: remove control type from formats 2025-06-18 15:23:16 +02:00
videotestsrc loop: spa_loop_invoke -> spa_loop_locked where possible 2025-05-30 11:59:35 +02:00
volume spa: fix volume plugin compilation 2024-06-18 15:44:26 +02:00
vulkan loop: spa_loop_invoke -> spa_loop_locked where possible 2025-05-30 11:59:35 +02:00
meson.build filter-chain: move the filter-graph to plugins 2024-11-13 11:12:06 +01:00