]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: fix another off-by-one in nvbios_addr
authorTimur Tabi <ttabi@nvidia.com>
Wed, 11 May 2022 16:37:16 +0000 (11:37 -0500)
committerLyude Paul <lyude@redhat.com>
Thu, 2 Jun 2022 22:40:03 +0000 (18:40 -0400)
commite099db969030fd0244b85ebd027dc74fda09d309
tree86478e27b7ec4f4fc63ba93cc30707eb0ca8db64
parentfd24840ba200d878a26f51350af54d4e063e18a5
drm/nouveau: fix another off-by-one in nvbios_addr

This check determines whether a given address is part of
image 0 or image 1.  Image 1 starts at offset image0_size,
so that address should be included.

Fixes: e047a96963c91 ("drm/nouveau/bios: guard against out-of-bounds accesses to image")
Cc: <stable@vger.kernel.org> # v4.8+
Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220511163716.3520591-1-ttabi@nvidia.com
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c