summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/xarray.py
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2025-09-19 11:48:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-15 13:04:22 +0300
commit6a7874ab814ce12003c46a92f7afc9b035c8e8e9 (patch)
tree27cfeb191893202c7ad0e969c956171ebb5b3c18 /scripts/gdb/linux/xarray.py
parentc07923f6a8729fc27ee652221a51702ff6654097 (diff)
downloadlinux-6a7874ab814ce12003c46a92f7afc9b035c8e8e9.tar.xz
tee: fix register_shm_helper()
commit d5cf5b37064b1699d946e8b7ab4ac7d7d101814c upstream. In register_shm_helper(), fix incorrect error handling for a call to iov_iter_extract_pages(). A case is missing for when iov_iter_extract_pages() only got some pages and return a number larger than 0, but not the requested amount. This fixes a possible NULL pointer dereference following a bad input from ioctl(TEE_IOC_SHM_REGISTER) where parts of the buffer isn't mapped. Cc: stable@vger.kernel.org Reported-by: Masami Ichikawa <masami256@gmail.com> Closes: https://lore.kernel.org/op-tee/CACOXgS-Bo2W72Nj1_44c7bntyNYOavnTjJAvUbEiQfq=u9W+-g@mail.gmail.com/ Tested-by: Masami Ichikawa <masami256@gmail.com> Fixes: 7bdee4157591 ("tee: Use iov_iter to better support shared buffer registration") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/xarray.py')
0 files changed, 0 insertions, 0 deletions