]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:17:23 +0000 (11:17 +0200)
commit8d279814b7d5db701be4e7f4723cc0b27548cb81
tree0c46c0076b7c9882bba7bebcfb6affa15d0840b5
parent7e802d81078f7919361c7608c35f283e501c2386
drm/nouveau: fix another off-by-one in nvbios_addr

commit c3b467464ce13099cb1778d2d8396bec6e6e0b16 upstream.

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: a5fc52e4bf667 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c