]> git.ipfire.org Git - thirdparty/linux.git/commit
apparmor: replace sprintf with snprintf in aa_new_learning_profile
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 22 Nov 2025 11:54:46 +0000 (12:54 +0100)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 16 Jan 2026 18:46:54 +0000 (10:46 -0800)
commit7db8c3c738118b6d9e5c3eb54e352fdae1bb0faf
tree2454171d77dcdb4df5dba8fb9338cb1c74da206a
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8
apparmor: replace sprintf with snprintf in aa_new_learning_profile

Replace unbounded sprintf() calls with snprintf() to prevent potential
buffer overflows in aa_new_learning_profile(). While the current code
works correctly, snprintf() is safer and follows secure coding best
practices.  No functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy.c