update to PKT lts-v4.19.28-base-190311T115000Z

Signed-off-by: Alek Du <alek.du@intel.com>
This commit is contained in:
Alek Du 2019-03-12 09:43:05 +00:00
parent cc4982f6ad
commit 1ffeaaa360
5 changed files with 10 additions and 65 deletions

View File

@ -1,53 +0,0 @@
From c2b316d9b2f1113770d47dddf8dfe85882b6c695 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 19 Feb 2019 10:10:38 +0800
Subject: [PATCH] exec: Fix mem leak in kernel_read_file
[ Upstream commit f612acfae86af7ecad754ae6a46019be9da05b8e ]
syzkaller report this:
BUG: memory leak
unreferenced object 0xffffc9000488d000 (size 9195520):
comm "syz-executor.0", pid 2752, jiffies 4294787496 (age 18.757s)
hex dump (first 32 bytes):
ff ff ff ff ff ff ff ff a8 00 00 00 01 00 00 00 ................
02 00 00 00 00 00 00 00 80 a1 7a c1 ff ff ff ff ..........z.....
backtrace:
[<000000000863775c>] __vmalloc_node mm/vmalloc.c:1795 [inline]
[<000000000863775c>] __vmalloc_node_flags mm/vmalloc.c:1809 [inline]
[<000000000863775c>] vmalloc+0x8c/0xb0 mm/vmalloc.c:1831
[<000000003f668111>] kernel_read_file+0x58f/0x7d0 fs/exec.c:924
[<000000002385813f>] kernel_read_file_from_fd+0x49/0x80 fs/exec.c:993
[<0000000011953ff1>] __do_sys_finit_module+0x13b/0x2a0 kernel/module.c:3895
[<000000006f58491f>] do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
[<00000000ee78baf4>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[<00000000241f889b>] 0xffffffffffffffff
It should goto 'out_free' lable to free allocated buf while kernel_read
fails.
Fixes: 39d637af5aa7 ("vfs: forbid write access when reading a file into memory")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Change-Id: I854547577c1e2ff7409c81ddf43a1678e13710b7
---
fs/exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exec.c b/fs/exec.c
index 1ebf6e5a521d..433b1257694a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -929,7 +929,7 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size,
bytes = kernel_read(file, *buf + pos, i_size - pos, &pos);
if (bytes < 0) {
ret = bytes;
- goto out;
+ goto out_free;
}
if (bytes == 0)
--
2.17.1

View File

@ -1,6 +1,6 @@
# #
# Automatically generated file; DO NOT EDIT. # Automatically generated file; DO NOT EDIT.
# Linux/x86 4.19.27 Kernel Configuration # Linux/x86 4.19.28 Kernel Configuration
# #
# #

View File

@ -14,16 +14,16 @@
# #
Name: linux-iot-lts2018 Name: linux-iot-lts2018
Version: 4.19.27 Version: 4.19.28
# upstream number is the number from PKT it consist in # upstream number is the number from PKT it consist in
# YYMMDDHHMM a 10 length number # YYMMDDHHMM a 10 length number
%global upstreamnumber 1903080404 %global upstreamnumber 1903111150
Release: 25 Release: 26
License: GPL-2.0 License: GPL-2.0
Summary: The Linux kernel Summary: The Linux kernel
Url: http://www.kernel.org/ Url: http://www.kernel.org/
Group: kernel Group: kernel
Source0: https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.27.tar.xz Source0: https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.28.tar.xz
Source1: config-iot-lts2018 Source1: config-iot-lts2018
Source2: config-iot-lts2018-sos Source2: config-iot-lts2018-sos
Source3: cmdline-iot-lts2018 Source3: cmdline-iot-lts2018
@ -32,8 +32,8 @@ Source5: fragment-sos
# quilt.url: https://github.com/intel/linux-intel-quilt # quilt.url: https://github.com/intel/linux-intel-quilt
# quilt.branch: 4.19/base # quilt.branch: 4.19/base
# quilt.tag: lts-v4.19.27-base-190308T040447Z # quilt.tag: lts-v4.19.28-base-190311T115000Z
# config.tag: lts-v4.19.27-base-190308T040447Z # config.tag: lts-v4.19.28-base-190311T115000Z
%define ktarget0 iot-lts2018 %define ktarget0 iot-lts2018
%define kversion0 %{version}-%{release}.%{ktarget0} %define kversion0 %{version}-%{release}.%{ktarget0}
@ -1087,7 +1087,6 @@ Patch1034: 1034-media-intel-ipu4-VIRT-Making-poll-req-timeo.patch
Patch1035: 1035-media-intel-ipu4-VIRT-Adding-VBS-dev-reset.patch Patch1035: 1035-media-intel-ipu4-VIRT-Adding-VBS-dev-reset.patch
Patch1036: 1036-ICI-Adding-delay-after-initializing-OV10635.patch Patch1036: 1036-ICI-Adding-delay-after-initializing-OV10635.patch
Patch1037: 1037-media-i2c-ti960-ICI-Enable-TI960-and-OV495-.patch Patch1037: 1037-media-i2c-ti960-ICI-Enable-TI960-and-OV495-.patch
Patch1038: 1038-exec-Fix-mem-leak-in-kernel_read_file.patch
#END XXXX: PK Series #END XXXX: PK Series
# Clear Linux Series # Clear Linux Series
@ -1140,7 +1139,7 @@ Requires: %{name} = %{version}-%{release}, %{name}-sos-extra = %{version}-
Linux kernel build files and install script Linux kernel build files and install script
%prep %prep
%setup -q -n linux-4.19.27 %setup -q -n linux-4.19.28
#patchXXXX PK Series #patchXXXX PK Series
%patch0001 -p1 %patch0001 -p1
@ -2180,7 +2179,6 @@ Linux kernel build files and install script
%patch1035 -p1 %patch1035 -p1
%patch1036 -p1 %patch1036 -p1
%patch1037 -p1 %patch1037 -p1
%patch1038 -p1
# End XXXX PK Series # End XXXX PK Series
# Clear Linux Series # Clear Linux Series

View File

@ -1 +1 @@
25 26

View File

@ -1 +1 @@
26020278762d49d451f05ecacb948aaf9c2ca3ff/linux-4.19.27.tar.xz e1ef2dcedf9c1d8a5d87099ba60e047bb2c0b38f/linux-4.19.28.tar.xz