Re: [PATCH] drm/nouveau/uvmm: fix UAF in bind job cleanup
From: Peiyang He
Date: Tue Sep 01 2026 - 03:44:55 EST
On 2026/9/1 14:32, Peiyang He wrote:
> drivers/gpu/drm/nouveau/nouveau_uvmm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_uvmm.c b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
> index f5e4756b4de4..aad14316cbef 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
> @@ -1318,6 +1318,7 @@ nouveau_uvmm_bind_job_submit(struct nouveau_job *job,
> op->reg = nouveau_uvma_region_find(uvmm, op->va.addr,
> op->va.range);
> if (!op->reg || op->reg->dirty) {
> + op->reg = NULL;
> ret = -ENOENT;
> goto unwind_continue;
> }
> @@ -1327,6 +1328,7 @@ nouveau_uvmm_bind_job_submit(struct nouveau_job *job,
> op->va.range);
> if (IS_ERR(op->ops)) {
> ret = PTR_ERR(op->ops);
> + op->reg = NULL;
> goto unwind_continue;
> }
None of the two issues pointed by Sashiko AI are introduced by this patch.