Skip to contentSkip to conversation

Linux 4.19.23

DISCUSSION Greg KH 1 participant 2 messages Feb 15, 2019 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.19.23 kernel.

All users of the 4.19 kernel series must upgrade.

The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Makefile           |    2 +-
 fs/binfmt_script.c |   10 +++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

Greg Kroah-Hartman (1):

      Linux 4.19.23

Linus Torvalds (1):
Revert "exec: load_script: don't blindly truncate shebang string"

author maintainer
#1 lore raw
Makefile +1 -1
index 8cfcb01fcd7b..3dcf3f2363c1 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 19
-SUBLEVEL = 22
+SUBLEVEL = 23
 EXTRAVERSION =
 NAME = "People's Front"
 
fs/binfmt_script.c +3 -7
index d0078cbb718b..7cde3f46ad26 100644
@@ -42,14 +42,10 @@ static int load_script(struct linux_binprm *bprm)
 	fput(bprm->file);
 	bprm->file = NULL;
 
-	for (cp = bprm->buf+2;; cp++) {
-		if (cp >= bprm->buf + BINPRM_BUF_SIZE)
-			return -ENOEXEC;
-		if (!*cp || (*cp == '\n'))
-			break;
-	}
+	bprm->buf[BINPRM_BUF_SIZE - 1] = '\0';
+	if ((cp = strchr(bprm->buf, '\n')) == NULL)
+		cp = bprm->buf+BINPRM_BUF_SIZE-1;
 	*cp = '\0';
-
 	while (cp > bprm->buf) {
 		cp--;
 		if ((*cp == ' ') || (*cp == '\t'))