[merged mm-nonmm-stable] lib-globc-added-null-check-for-character-class.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: lib: glob.c: added null check for character class
has been removed from the -mm tree.  Its filename was
     lib-globc-added-null-check-for-character-class.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: Alok Swaminathan <swaminathanalok@xxxxxxxxx>
Subject: lib: glob.c: added null check for character class
Date: Mon, 26 Aug 2024 11:57:09 -0400

Add null check for character class.  Previously, an inverted character
class could result in a nul byte being matched and lead to the function
reading past the end of the inputted string.

Link: https://lkml.kernel.org/r/20240826155709.12383-1-swaminathanalok@xxxxxxxxx
Signed-off-by: Alok Swaminathan <swaminathanalok@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/glob.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/lib/glob.c~lib-globc-added-null-check-for-character-class
+++ a/lib/glob.c
@@ -68,6 +68,8 @@ bool __pure glob_match(char const *pat,
 			back_str = --str;	/* Allow zero-length match */
 			break;
 		case '[': {	/* Character class */
+			if (c == '\0')	/* No possible match */
+				return false;
 			bool match = false, inverted = (*pat == '!');
 			char const *class = pat + inverted;
 			unsigned char a = *class++;
_

Patches currently in -mm which might be from swaminathanalok@xxxxxxxxx are






[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux