linux-stable/drivers/dma-buf
Azeem Shaikh 5565a8e1a0 dma-buf/sw_sync: Replace all non-returning strlcpy with strscpy
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230523021943.2406847-1-azeemshaikh38@gmail.com
2023-05-24 16:32:25 +05:30
..
heaps - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
Kconfig dma-buf: deprecate DMABUF_SYSFS_STATS 2022-06-23 10:51:43 +02:00
Makefile dma-buf: cleanup dma_fence_unwrap implementation 2022-05-30 14:16:32 +02:00
dma-buf-sysfs-stats.c dma-buf: make kobj_type structure constant 2023-02-17 10:59:14 +01:00
dma-buf-sysfs-stats.h dma-buf: fix dma_buf_export init order v2 2022-12-13 08:31:45 +01:00
dma-buf.c dma-buf: Include missing parentheses to documentation 2023-03-03 14:35:09 -03:00
dma-fence-array.c dma-buf/fence-array: Add fence deadline support 2023-03-25 10:55:07 -07:00
dma-fence-chain.c dma-buf/fence-chain: Add fence deadline support 2023-03-28 13:38:52 -07:00
dma-fence-unwrap.c dma-buf: revert "return only unsignaled fences in dma_fence_unwrap_for_each v3" 2022-07-14 14:41:30 +02:00
dma-fence.c dma-buf/dma-fence: Add deadline awareness 2023-03-25 10:55:07 -07:00
dma-heap.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
dma-resv.c dma-buf/dma-resv.c: fix a typo 2023-04-17 08:24:31 +02:00
selftest.c
selftest.h
selftests.h dma-buf: add dma_fence_unwrap v2 2022-03-25 14:18:28 +01:00
st-dma-fence-chain.c treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
st-dma-fence-unwrap.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
st-dma-fence.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
st-dma-resv.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
sw_sync.c dma-buf/sw_sync: Replace all non-returning strlcpy with strscpy 2023-05-24 16:32:25 +05:30
sync_debug.c
sync_debug.h
sync_file.c dma-buf/sync_file: use strscpy to replace strlcpy 2022-08-10 13:50:49 +02:00
sync_trace.h
udmabuf.c udmabuf: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:54 -07:00