linux/drivers/firmware
Justin Stitt 9b9056a313 firmware: tegra: bpmp: Replace deprecated strncpy() with strscpy_pad()
`strncpy` is deprecated for use on NUL-terminated destination strings [1].

We should prefer more robust and less ambiguous string interfaces.

It seems like the filename stored at `namevirt` is expected to be
NUL-terminated.

A suitable replacement is `strscpy_pad` due to the fact that it
guarantees NUL-termination on the destination buffer whilst maintaining
the NUL-padding behavior that strncpy provides.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230913-strncpy-drivers-firmware-tegra-bpmp-debugfs-c-v1-1-828b0a8914b5@google.com
Signed-off-by: Kees Cook <keescook@chromium.org>
2023-09-29 14:48:31 -07:00
..
arm_ffa firmware: arm_ffa: Set handle field to zero in memory descriptor 2023-06-06 13:41:56 +01:00
arm_scmi ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
broadcom MIPS: BCM47XX: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
cirrus firmware: cs_dsp: Fix new control name check 2023-08-15 19:23:01 +01:00
efi efi/unaccepted: Use ACPI reclaim memory for unaccepted memory table 2023-09-11 06:37:51 +00:00
google firmware: coreboot: framebuffer: Allow building with simpledrm 2023-08-04 16:31:32 +02:00
imx ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
meson firmware: meson_sm: fix to avoid potential NULL pointer dereference 2023-08-04 15:19:01 +02:00
psci firmware/psci: demote suspend-mode warning to info level 2023-04-14 13:48:56 +02:00
smccc firmware: smccc: Fix use of uninitialised results structure 2023-07-18 10:08:05 +01:00
tegra firmware: tegra: bpmp: Replace deprecated strncpy() with strscpy_pad() 2023-09-29 14:48:31 -07:00
xilinx Pin control bulk changes for the v6.6 kernel cycle: 2023-08-30 19:36:19 -07:00
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-07-04 14:28:42 +01:00
arm_sdei.c arm64: sdei: abort running SDEI handlers during crash 2023-08-04 17:35:33 +01:00
dmi_scan.c firmware: dmi: Fortify entry point length checks 2022-09-23 14:53:14 +02:00
dmi-id.c driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
dmi-sysfs.c firmware: dmi-sysfs: handle HAS_IOPORT=n 2023-05-31 19:17:29 +01:00
edd.c edd: make kobj_type structure constant 2023-03-09 18:07:33 +01:00
iscsi_ibft_find.c iscsi_ibft: Fix finding the iBFT under Xen Dom 0 2023-06-26 07:47:11 +02:00
iscsi_ibft.c
Kconfig sound updates for 5.19-rc1 2022-05-25 16:55:16 -07:00
Makefile Follow-up tweaks for the EFI changes in v5.19 2022-06-03 13:39:30 -07:00
memmap.c
mtk-adsp-ipc.c firmware: Explicitly include correct DT includes 2023-08-12 10:31:01 +02:00
pcdp.c
pcdp.h
qcom_scm-legacy.c firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ 2023-02-08 19:15:16 -08:00
qcom_scm-smc.c firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ 2023-02-08 19:15:16 -08:00
qcom_scm.c firmware: qcom_scm: Convert all symbols to EXPORT_SYMBOL_GPL 2023-07-27 20:29:06 -07:00
qcom_scm.h firmware: qcom: scm: Add wait-queue handling logic 2023-01-18 21:14:40 -06:00
qemu_fw_cfg.c firmware: qemu_fw_cfg: remove sysfs entries explicitly 2022-01-14 18:50:52 -05:00
raspberrypi.c firmware: Explicitly include correct DT includes 2023-08-12 10:31:01 +02:00
scpi_pm_domain.c firmware: Explicitly include correct DT includes 2023-08-12 10:31:01 +02:00
stratix10-rsu.c Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
stratix10-svc.c firmware: stratix10-svc: Generic Mailbox Command 2023-08-04 16:31:37 +02:00
sysfb_simplefb.c firmware/sysfb: Fix VESA format selection 2023-04-21 14:27:31 +02:00
sysfb.c drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync 2023-05-15 13:36:30 +02:00
ti_sci.c firmware: ti_sci: Fixup documentation errors 2023-07-11 13:04:14 -05:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: make kobj_type structure constant 2023-04-07 17:17:00 +02:00