summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch')
-rw-r--r--media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch b/media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch
new file mode 100644
index 000000000000..6080ff4fd7ab
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch
@@ -0,0 +1,36 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/39c8ed4f62172026036281691cd3b67b469a8629
+
+From 39c8ed4f62172026036281691cd3b67b469a8629 Mon Sep 17 00:00:00 2001
+From: Pauli Virtanen <pav@iki.fi>
+Date: Thu, 16 Sep 2021 19:18:52 +0300
+Subject: [PATCH] media-session: don't use-after-free if linking node removed
+
+Should fix an ASAN crash.
+---
+ src/examples/media-session/policy-node.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/examples/media-session/policy-node.c b/src/examples/media-session/policy-node.c
+index d83613d0b..e273434fa 100644
+--- a/src/examples/media-session/policy-node.c
++++ b/src/examples/media-session/policy-node.c
+@@ -869,6 +869,7 @@ static int link_nodes(struct node *node, struct node *peer)
+ struct pw_properties *props;
+ struct node *output, *input;
+ int res;
++ uint32_t node_id = node->id;
+
+ pw_log_debug(NAME " %p: link nodes %d %d remix:%d", impl,
+ node->id, peer->id, !node->dont_remix);
+@@ -902,7 +903,7 @@ static int link_nodes(struct node *node, struct node *peer)
+
+ if (impl->linking_node_removed) {
+ impl->linking_node_removed = false;
+- pw_log_info("linking node %d was removed", node->id);
++ pw_log_info("linking node %d was removed", node_id);
+ return -ENOENT;
+ }
+ node->linking = false;
+--
+GitLab
+