On 1/9/26 7:18 PM, Kees Cook wrote:
On Fri, Jan 09, 2026 at 04:25:14PM +0000, Yicong Hui wrote:
strcpy() is deprecated as it does not do any bounds checking (as
specified in Documentation/process/deprecated.rst).

There is a risk of buffer overflow in the case that the value for
THIS_MODULE->version exceeds the 64 characters. This is unlikely, but
replacing the deprecated function will pre-emptively remove this risk
entirely.

Replace both instances of strcpy() with the safer strscpy() function.

This looks correct to me -- dest and src are both fixed-size, so strscpy
happily checks everything at compile time. :)

Reviewed-by: Kees Cook <[email protected]>

-Kees


Hello!

Is there any further feedback or progress on this patch?

Thank you!
Yicong

Reply via email to