]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
apparmor: Replace memcpy + NUL termination with kmemdup_nul in do_setattr
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 25 Jan 2026 21:00:15 +0000 (22:00 +0100)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 22 Apr 2026 17:57:52 +0000 (10:57 -0700)
commit46401cc99c6237ba825cfd65ef023955ce2a6316
treee32f384169802a76f251cc277729bcf0004b0977
parent8813837aa7f5f5a262a5ebc1a1a2a3a5ec818c70
apparmor: Replace memcpy + NUL termination with kmemdup_nul in do_setattr

Use kmemdup_nul() to copy 'value' instead of using memcpy() followed by
a manual NUL termination.  No functional changes.

Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/lsm.c