Files
linux-nvgpu/drivers/gpu/nvgpu/common/mm/allocators
Sagar Kamble 71eee998b1 gpu: nvgpu: sanitize page allocator name
strncpy to a string from non-null terminating string without checking the
size of the source string can lead to target string become non-null
terminating. This can't be passed to strcat as it expects null
terminating string.

Check the size of the source string "name" in nvgpu_page_allocator_init.

CID 81207
Bug 3512546

Change-Id: I4b245a8c2236038c40912cee72d4dbf1ca14a525
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2692604
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-04-07 03:24:15 -07:00
..