drm/amdgpu: fix possible UAF in amdgpu_cs_pass1()
authorjsg <jsg@openbsd.org>
Thu, 17 Aug 2023 03:37:18 +0000 (03:37 +0000)
committerjsg <jsg@openbsd.org>
Thu, 17 Aug 2023 03:37:18 +0000 (03:37 +0000)
From Alex Deucher
9a2393af1f35d1975204fc00035c64a1c792b278 in linux-6.1.y/6.1.46
90e065677e0362a777b9db97ea21d43a39211399 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c

index 8f9a1cf..b2b64a6 100644 (file)
@@ -287,7 +287,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
 
        if (!p->gang_size) {
                ret = -EINVAL;
-               goto free_partial_kdata;
+               goto free_all_kdata;
        }
 
        for (i = 0; i < p->gang_size; ++i) {