
Linux 7.2 eliminates last strncpy() calls, closing multi-year kernel memory-safety cleanup
Linux kernel 7.2 has removed all remaining instances of strncpy(), completing a systematic deprecation effort spanning multiple release cycles. The function fails to guarantee NUL termination when source strings meet or exceed buffer length, creating silent buffer-overflow hazards. The kernel has replaced strncpy() with strscpy(), which always terminates correctly and signals truncation via -E2BIG. Downstream and vendor kernels must conduct their own cleanups independently.
Published