diff options
author | Andreas Wellving <andreas.wellving@enea.com> | 2019-05-22 05:54:38 +0200 |
---|---|---|
committer | Adrian Mangeac <Adrian.Mangeac@enea.com> | 2019-05-22 11:14:21 +0200 |
commit | 00ec0744691cc2d8f41538ce04201faa4feac055 (patch) | |
tree | e262d22ea929c3a4439d474f244d7a6dce8313f4 | |
parent | 3bd65a088b1f1a98cbff40e23fdc41a2d0db4fc2 (diff) | |
download | enea-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.patch | 57 |
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 @@ | |||
1 | From 26dbb30c58ffb85bc015bd5e58831483d50f7d18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Theodore Ts'o <tytso@mit.edu> | ||
3 | Date: Thu, 29 Mar 2018 22:10:31 -0400 | ||
4 | Subject: [PATCH] ext4: always initialize the crc32c checksum driver | ||
5 | |||
6 | commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream. | ||
7 | |||
8 | The extended attribute code now uses the crc32c checksum for hashing | ||
9 | purposes, so we should just always always initialize it. We also want | ||
10 | to prevent NULL pointer dereferences if one of the metadata checksum | ||
11 | features is enabled after the file sytsem is originally mounted. | ||
12 | |||
13 | This issue has been assigned CVE-2018-1094. | ||
14 | |||
15 | https://bugzilla.kernel.org/show_bug.cgi?id=199183 | ||
16 | https://bugzilla.redhat.com/show_bug.cgi?id=1560788 | ||
17 | |||
18 | CVE: CVE-2018-1094 | ||
19 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=26dbb30c58ffb85bc015bd5e58831483d50f7d18] | ||
20 | |||
21 | Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ||
22 | Cc: stable@vger.kernel.org | ||
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
24 | Signed-off-by: Andreas Wellving <andreas.wellving@enea.com> | ||
25 | --- | ||
26 | fs/ext4/super.c | 15 ++++++--------- | ||
27 | 1 file changed, 6 insertions(+), 9 deletions(-) | ||
28 | |||
29 | diff --git a/fs/ext4/super.c b/fs/ext4/super.c | ||
30 | index 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 | -- | ||
56 | 2.20.1 | ||
57 | |||