Skip to contentSkip to conversation

mm-hugetlb-fix-early-boot-crash-on-parameters-without-=-separator.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Apr 18 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/hugetlb: fix early boot crash on parameters without '=' separator
has been removed from the -mm tree. Its filename was
mm-hugetlb-fix-early-boot-crash-on-parameters-without-=-separator.patch

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

------------------------------------------------------
From: Thorsten Blum <[email protected]>
Subject: mm/hugetlb: fix early boot crash on parameters without '=' separator
Date: Thu, 9 Apr 2026 12:54:40 +0200

If hugepages, hugepagesz, or default_hugepagesz are specified on the kernel command line without the '=' separator, early parameter parsing passes NULL to hugetlb_add_param(), which dereferences it in strlen() and can crash the system during early boot.

Reject NULL values in hugetlb_add_param() and return -EINVAL instead.

Fixes 5b47c02967ab ("mm/hugetlb: convert cmdline parameters from setup to early")
Cc David Hildenbrand <[email protected]>
Cc Frank van der Linden <[email protected]>
Cc Oscar Salvador <[email protected]>

---

 mm/hugetlb.c |    3 +++
 1 file changed, 3 insertions(+)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-fix-early-boot-crash-on-parameters-without-=-separator +3 -0
@@ -4226,6 +4226,9 @@ static __init int hugetlb_add_param(char
 	size_t len;
 	char *p;
 
+	if (!s)
+		return -EINVAL;
+
 	if (hugetlb_param_index >= HUGE_MAX_CMDLINE_ARGS)
 		return -EINVAL;
 

_

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