lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJedcCxmnnrVsq6TtyNPp1v7yv6hszbWnRub8V=ZNFA7OaFa=g@mail.gmail.com>
Date:   Tue, 7 Mar 2023 12:24:58 +0800
From:   Zheng Hacker <hackerzheng666@...il.com>
To:     Lyude Paul <lyude@...hat.com>
Cc:     Zheng Wang <zyytlz.wz@....com>, nouveau@...ts.freedesktop.org,
        bskeggs@...hat.com, kherbst@...hat.com, airlied@...il.com,
        alex000young@...il.com, security@...nel.org, daniel@...ll.ch,
        Julia.Lawall@...ia.fr, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/nouveau/mmu: fix use-after-free bug in nvkm_vmm_pfn_map

Hi,

This bug has been proved to be a false positive. So there is no need
to make the patch.

Thanks,
Zheng

Lyude Paul <lyude@...hat.com> 于2023年3月7日周二 08:11写道:
>
> Actually - could you resend this with dri-devel@...ts.freedesktop.org added to
> the cc list just to make patchwork happy?
>
> On Sat, 2022-10-29 at 15:46 +0800, Zheng Wang wrote:
> > If it failed in kzalloc, vma will be freed in nvkm_vmm_node_merge.
> > The later use of vma will casue use after free.
> >
> > Reported-by: Zheng Wang <hackerzheng666@...il.com>
> > Reported-by: Zhuorao Yang <alex000young@...il.com>
> >
> > Fix it by returning to upper caller as soon as error occurs.
> >
> > Signed-off-by: Zheng Wang <zyytlz.wz@....com>
> > ---
> >  drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> > index ae793f400ba1..04befd28f80b 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> > @@ -1272,8 +1272,7 @@ nvkm_vmm_pfn_map(struct nvkm_vmm *vmm, u8 shift, u64 addr, u64 size, u64 *pfn)
> >                                                      page -
> >                                                      vmm->func->page, map);
> >                       if (WARN_ON(!tmp)) {
> > -                             ret = -ENOMEM;
> > -                             goto next;
> > +                             return -ENOMEM;
> >                       }
> >
> >                       if ((tmp->mapped = map))
>
> --
> Cheers,
>  Lyude Paul (she/her)
>  Software Engineer at Red Hat
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ