[PATCH v2 6.1.y 0/3] Backport to fix CVE-2024-36478