Re: [PATCH v2] accel/rocket: Fix drm_mm UAF on close vs in-flight job

From: Gyeyoung Baek

Date: Wed Nov 18 2026 - 21:06:58 EST


Thanks!
(Re-adding the lists)

On Tue, Nov 17, 2026 at 10:05 PM Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx> wrote:
>
>
> On Sun, 01 Nov 2026 16:37:00 +0900, Gyeyoung Baek wrote:
> > The drm_mm and its mutex live in rocket_file_priv, which
> > rocket_postclose() frees on fd close. But a BO held by an
> > in-flight job is only freed after close, from the drm_sched
> > free_job worker, and its destructor then accesses the already
> > freed drm_mm and mutex.
> >
> > BUG: KASAN: slab-use-after-free in __mutex_trylock_common+0x90/0x1e8
> > Workqueue: <NPU>.npu drm_sched_free_job_work [gpu_sched]
> > Call trace:
> > __mutex_lock
> > rocket_gem_bo_free
> > rocket_job_cleanup
> > rocket_job_free
> > drm_sched_free_job_work [gpu_sched]
> >
> > [...]
>
> Applied, thanks!
>
> [1/1] accel/rocket: Fix drm_mm UAF on close vs in-flight job
> commit: c3fe8795ecd844d0bf76102217bec01cce01b715
>
> Best regards,
> --
> Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx>



--
Thanks,
Gyeyoung