Skip to contentSkip to conversation

tsacct-replace-strncpy-with-strscpy.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jul 12, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: tsacct: replace strncpy() with strscpy()
has been removed from the -mm tree. Its filename was
tsacct-replace-strncpy-with-strscpy.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Kees Cook <[email protected]>
Subject: tsacct: replace strncpy() with strscpy()
Date: Thu, 11 Jul 2024 10:13:09 -0700

Replace the deprecated[1] use of strncpy() in bacct_add_tsk(). Since this is UAPI, include trailing padding in the copy.

---

 kernel/tsacct.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/tsacct.c renamed from kernel/tsacct.c~tsacct-replace-strncpy-with-strscpy +1 -1
@@ -76,7 +76,7 @@ void bacct_add_tsk(struct user_namespace
 	stats->ac_minflt = tsk->min_flt;
 	stats->ac_majflt = tsk->maj_flt;
 
-	strncpy(stats->ac_comm, tsk->comm, sizeof(stats->ac_comm));
+	strscpy_pad(stats->ac_comm, tsk->comm);
 }
 
 

_

Patches currently in -mm which might be from [email protected] are