diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-04-11 03:38:47 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-04-11 03:38:47 +0000 |
commit | 14132355bcd2f38f132e6af4b26ec0180c809a31 (patch) | |
tree | f32a3803a284fb5fa57fde74731850ae5b7d7b7a | |
parent | 381affe0a50ff98355fb32e6fba968d217432cc2 (diff) |
drm/i915/gem: add missing boundary check in vm_access
From Mastan Katragadda
312d3d4f49e12f97260bcf972c848c3562126a18 in linux 5.15.y/5.15.33
3886a86e7e6cc6ce2ce93c440fecd8f42aed0ce7 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/i915/gem/i915_gem_mman.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c index 2607a4fde21..330cb25c5be 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c @@ -473,7 +473,7 @@ vm_access(struct vm_area_struct *area, unsigned long addr, return -EACCES; addr -= area->vm_start; - if (addr >= obj->base.size) + if (range_overflows_t(u64, addr, len, obj->base.size)) return -EINVAL; i915_gem_ww_ctx_init(&ww, true); |