summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Wellving <andreas.wellving@enea.com>2019-05-22 05:54:38 +0200
committerAdrian Mangeac <Adrian.Mangeac@enea.com>2019-05-22 11:14:21 +0200
commit00ec0744691cc2d8f41538ce04201faa4feac055 (patch)
treee262d22ea929c3a4439d474f244d7a6dce8313f4
parent3bd65a088b1f1a98cbff40e23fdc41a2d0db4fc2 (diff)
downloadenea-kernel-cache-00ec0744691cc2d8f41538ce04201faa4feac055.tar.gz
ext4: CVE-2018-1094
ext4: always initialize the crc32c checksum driver Reference: https://nvd.nist.gov/vuln/detail/CVE-2018-1094 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=26dbb30c58ffb85bc015bd5e58831483d50f7d18 Change-Id: I0acd7b471992aaecfa43c1d94d62aa2a6ad8a3b6 Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
-rw-r--r--patches/cve/CVE-2018-1094-ext4-always-initialize-the-crc32c-checksum-driver.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/patches/cve/CVE-2018-1094-ext4-always-initialize-the-crc32c-checksum-driver.patch b/patches/cve/CVE-2018-1094-ext4-always-initialize-the-crc32c-checksum-driver.patch
new file mode 100644
index 0000000..603ac55
--- /dev/null
+++ b/patches/cve/CVE-2018-1094-ext4-always-initialize-the-crc32c-checksum-driver.patch
@@ -0,0 +1,57 @@
1From 26dbb30c58ffb85bc015bd5e58831483d50f7d18 Mon Sep 17 00:00:00 2001
2From: Theodore Ts'o <tytso@mit.edu>
3Date: Thu, 29 Mar 2018 22:10:31 -0400
4Subject: [PATCH] ext4: always initialize the crc32c checksum driver
5
6commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.
7
8The extended attribute code now uses the crc32c checksum for hashing
9purposes, so we should just always always initialize it. We also want
10to prevent NULL pointer dereferences if one of the metadata checksum
11features is enabled after the file sytsem is originally mounted.
12
13This issue has been assigned CVE-2018-1094.
14
15https://bugzilla.kernel.org/show_bug.cgi?id=199183
16https://bugzilla.redhat.com/show_bug.cgi?id=1560788
17
18CVE: CVE-2018-1094
19Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=26dbb30c58ffb85bc015bd5e58831483d50f7d18]
20
21Signed-off-by: Theodore Ts'o <tytso@mit.edu>
22Cc: stable@vger.kernel.org
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
25---
26 fs/ext4/super.c | 15 ++++++---------
27 1 file changed, 6 insertions(+), 9 deletions(-)
28
29diff --git a/fs/ext4/super.c b/fs/ext4/super.c
30index 16d247f056e2..1339a79eb314 100644
31--- a/fs/ext4/super.c
32+++ b/fs/ext4/super.c
33@@ -3490,15 +3490,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
34 }
35
36 /* Load the checksum driver */
37- if (ext4_has_feature_metadata_csum(sb) ||
38- ext4_has_feature_ea_inode(sb)) {
39- sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
40- if (IS_ERR(sbi->s_chksum_driver)) {
41- ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
42- ret = PTR_ERR(sbi->s_chksum_driver);
43- sbi->s_chksum_driver = NULL;
44- goto failed_mount;
45- }
46+ sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
47+ if (IS_ERR(sbi->s_chksum_driver)) {
48+ ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
49+ ret = PTR_ERR(sbi->s_chksum_driver);
50+ sbi->s_chksum_driver = NULL;
51+ goto failed_mount;
52 }
53
54 /* Check superblock checksum */
55--
562.20.1
57