Skip to contentSkip to conversation

mm-huge_memory-handle-strsep-not-finding-delimiter.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Dec 19, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: huge_memory: handle strsep not finding delimiter
has been removed from the -mm tree. Its filename was
mm-huge_memory-handle-strsep-not-finding-delimiter.patch

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

------------------------------------------------------
From: Leo Stone <[email protected]>
Subject: mm: huge_memory: handle strsep not finding delimiter
Date: Sun, 15 Dec 2024 20:27:51 -0800

split_huge_pages_write() does not handle the case where strsep finds no delimiter in the given string and sets the input buffer to NULL, which allows this reproducer to trigger a protection fault.

---

 mm/huge_memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-huge_memory-handle-strsep-not-finding-delimiter +1 -1
@@ -4169,7 +4169,7 @@ static ssize_t split_huge_pages_write(st
 		size_t input_len = strlen(input_buf);
 
 		tok = strsep(&buf, ",");
-		if (tok) {
+		if (tok && buf) {
 			strscpy(file_path, tok);
 		} else {
 			ret = -EINVAL;

_

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