aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorAzeem Shaikh <[email protected]>2023-05-30 15:56:08 +0000
committerJens Axboe <[email protected]>2023-06-01 15:13:31 +0000
commit20d099756b98fa6b5b838448b1ffbce46f4f3283 (patch)
tree7395fa0c837d62973e862518c40d326844533da6 /fs/btrfs/dev-replace.c
parentblk-ioc: protect ioc_destroy_icq() by 'queue_lock' (diff)
downloadkernel-20d099756b98fa6b5b838448b1ffbce46f4f3283.tar.gz
kernel-20d099756b98fa6b5b838448b1ffbce46f4f3283.zip
block: 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 <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions