aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorZhenhao Wan <whi4ed0g@gmail.com>2026-08-12 23:00:05 +0800
committerLyude Paul <lyude@redhat.com>2026-10-09 19:31:15 -0400
commitf569473c1393c0a0f2d9061a4c34cb3f7cefc8fe (patch)
treeecd3376558599c1432969ff2bbd1c4cc7bfd74ad /scripts/Makefile.thinlto
parentdrm/panthor: Fix TOCTOU race between GROUP_REGISTERED check and erase (diff)
drm/nouveau: prevent NULL deref of gr in GETPARAM_GRAPH_UNITS
nouveau_abi16_ioctl_getparam() fetches the graphics engine with gr = nvxx_gr(drm) (i.e. drm->nvkm->gr) and, for the NOUVEAU_GETPARAM_GRAPH_UNITS parameter, passes it straight to nvkm_gr_units(), which dereferences gr->func with no NULL check. When graphics-engine construction returns -ENODEV, NVKM treats it as an optional absent engine: the NVKM_LAYOUT_ONCE device constructor deletes the subdevice, leaves device->gr == NULL and continues probing, and Nouveau still registers a render node. An unprivileged client holding a /dev/dri/renderD* fd can then issue DRM_IOCTL_NOUVEAU_GETPARAM with NOUVEAU_GETPARAM_GRAPH_UNITS and oops the kernel on the NULL gr. Report 0 units when gr is absent. This matches nvkm_gr_units() itself, which already returns 0 when the engine exposes no units callback. Reported-by: Yuhao Jiang <danisjiang@gmail.com> Assisted-by: LLM Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260812-nouveau-nvkm-absent-subdev-null-deref-v1-2-7e057f6aeba0@gmail.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions