From eb623bd91dfdab468600924aabac51f06d3a8f99 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 8 Jan 2026 22:22:52 +0100 Subject: [PATCH] animationMgr: avoid uaf in ::tick() if handleUpdate destroys AV ref https://github.com/hyprwm/Hyprland/discussions/12840 --- src/managers/animation/AnimationManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/managers/animation/AnimationManager.cpp b/src/managers/animation/AnimationManager.cpp index 9a3fc157..05ce6939 100644 --- a/src/managers/animation/AnimationManager.cpp +++ b/src/managers/animation/AnimationManager.cpp @@ -216,6 +216,9 @@ void CHyprAnimationManager::tick() { if (!PAV) continue; + // lock this value while we are doing handleUpdate to avoid a UAF if an update callback destroys it + const auto LOCK = PAV.lock(); + // for disabled anims just warp bool warp = !*PANIMENABLED || !PAV->enabled();