drm/nouveau: fix u32 overflow in pushbuf reloc bounds check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a1606a9596e54da90ad6209071b357a4c1b0fa82 · < 332884f5eb79dd60a7162b079d09d39208567a31| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/nouveau: fix u32 overflow in pushbuf reloc bounds check
nouveau_gem_pushbuf_reloc_apply() validates each relocation with
if (r->reloc_bo_offset + 4 > nvbo->bo.base.size)
but reloc_bo_offset is __u32 (uapi/drm/nouveau_drm.h) and the integer literal 4 promotes to unsigned int, so the addition is performed in 32 bits and wraps before the comparison against the size_t bo size.
Cast to u64 so the addition happens in 64-bit arithmetic.
[ Add Fixes: tag. - Danilo ]
From the CVE record · Linux
The Linux kernel's nouveau driver uses a 32-bit addition when checking pushbuf relocation bounds, allowing the calculation to wrap and bypass the check. A crafted relocation could lead to an out-of-bounds write. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with the nouveau driver should check their kernel versions; affected versions are not specified.