linux-stable/include
Kees Cook 62e1cbfc5d fortify: Short-circuit known-safe calls to strscpy()
Replacing compile-time safe calls of strcpy()-related functions with
strscpy() was always calling the full strscpy() logic when a builtin
would be better. For example:

	char buf[16];
	strcpy(buf, "yes");

would reduce to __builtin_memcpy(buf, "yes", 4), but not if it was:

	strscpy(buf, yes, sizeof(buf));

Fix this by checking if all sizes are known at compile-time.

Cc: linux-hardening@vger.kernel.org
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
2022-11-01 10:04:52 -07:00
..
acpi platform-drivers-x86 for v6.1-1 2022-10-05 10:38:24 -07:00
asm-generic - hfs and hfsplus kmap API modernization from Fabio Francesco 2022-10-12 11:00:22 -07:00
clocksource
crypto
drm Driver core changes for 6.1-rc1 2022-10-07 17:04:10 -07:00
dt-bindings These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
keys
kunit kunit: declare kunit_assert structs as const 2022-10-07 10:19:18 -06:00
kvm
linux fortify: Short-circuit known-safe calls to strscpy() 2022-11-01 10:04:52 -07:00
math-emu
media USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
memory
misc
net Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
pcmcia
ras
rdma
rv
scsi SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
soc RISC-V Patches for the 6.1 Merge Window, Part 2 2022-10-14 11:21:11 -07:00
sound ALSA: hda: Update register polling macros 2022-10-09 12:34:32 +02:00
target
trace f2fs-for-6.1-rc1 2022-10-10 20:28:41 -07:00
uapi This pull request contains updates for UBI and UBIFS 2022-10-14 18:23:23 -07:00
ufs SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
vdso
video
xen xen/virtio: enable grant based virtio on x86 2022-10-10 14:31:26 +02:00