diff options
| -rw-r--r-- | meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch | 63 | ||||
| -rw-r--r-- | meta-oe/recipes-support/udisks/udisks2_git.bb | 1 |
2 files changed, 64 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch b/meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch new file mode 100644 index 0000000000..0189833b49 --- /dev/null +++ b/meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | From 2517b8feb13919c382e53ab5f9b63c5b5ee5b063 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Emilio Pozuelo Monfort <pochu@debian.org> | ||
| 3 | Date: Fri, 5 Nov 2021 09:29:13 +0100 | ||
| 4 | Subject: [PATCH] udisks2 security update | ||
| 5 | |||
| 6 | mount options: Always use errors=remount-ro for ext filesystems | ||
| 7 | |||
| 8 | Stefan Walter found that udisks2, a service to access and manipulate | ||
| 9 | storage devices, could cause denial of service via system crash if a | ||
| 10 | corrupted or specially crafted ext2/3/4 device or image was mounted, | ||
| 11 | which could happen automatically on certain environments. | ||
| 12 | |||
| 13 | For Debian 9 stretch, this problem has been fixed in version | ||
| 14 | 2.1.8-1+deb9u1. | ||
| 15 | |||
| 16 | Default mount options are focused primarily on data safety, mounting | ||
| 17 | damaged ext2/3/4 filesystem as readonly would indicate something's wrong. | ||
| 18 | |||
| 19 | Upstream-Status: Backport [http://security.debian.org/debian-security/pool/updates/main/u/udisks2/udisks2_2.1.8-1+deb9u1.debian.tar.xz] | ||
| 20 | CVE: CVE-2021-3802 | ||
| 21 | |||
| 22 | Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com> | ||
| 23 | |||
| 24 | --- | ||
| 25 | src/udiskslinuxfilesystem.c | 18 ++++++++++++++++++ | ||
| 26 | 1 file changed, 18 insertions(+) | ||
| 27 | |||
| 28 | diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c | ||
| 29 | index a5a3898c..eac8cab3 100644 | ||
| 30 | --- a/src/udiskslinuxfilesystem.c | ||
| 31 | +++ b/src/udiskslinuxfilesystem.c | ||
| 32 | @@ -421,6 +421,21 @@ static const gchar *hfsplus_allow[] = { "creator", "type", "umask", "session", " | ||
| 33 | static const gchar *hfsplus_allow_uid_self[] = { "uid", NULL }; | ||
| 34 | static const gchar *hfsplus_allow_gid_self[] = { "gid", NULL }; | ||
| 35 | |||
| 36 | +/* ---------------------- ext2 -------------------- */ | ||
| 37 | + | ||
| 38 | +static const gchar *ext2_defaults[] = { "errors=remount-ro", NULL }; | ||
| 39 | +static const gchar *ext2_allow[] = { "errors=remount-ro", NULL }; | ||
| 40 | + | ||
| 41 | +/* ---------------------- ext3 -------------------- */ | ||
| 42 | + | ||
| 43 | +static const gchar *ext3_defaults[] = { "errors=remount-ro", NULL }; | ||
| 44 | +static const gchar *ext3_allow[] = { "errors=remount-ro", NULL }; | ||
| 45 | + | ||
| 46 | +/* ---------------------- ext4 -------------------- */ | ||
| 47 | + | ||
| 48 | +static const gchar *ext4_defaults[] = { "errors=remount-ro", NULL }; | ||
| 49 | +static const gchar *ext4_allow[] = { "errors=remount-ro", NULL }; | ||
| 50 | + | ||
| 51 | /* ------------------------------------------------ */ | ||
| 52 | /* TODO: support context= */ | ||
| 53 | |||
| 54 | @@ -434,6 +449,9 @@ static const FSMountOptions fs_mount_options[] = | ||
| 55 | { "udf", udf_defaults, udf_allow, udf_allow_uid_self, udf_allow_gid_self }, | ||
| 56 | { "exfat", exfat_defaults, exfat_allow, exfat_allow_uid_self, exfat_allow_gid_self }, | ||
| 57 | { "hfsplus", hfsplus_defaults, hfsplus_allow, hfsplus_allow_uid_self, hfsplus_allow_gid_self }, | ||
| 58 | + { "ext2", ext2_defaults, ext2_allow, NULL, NULL }, | ||
| 59 | + { "ext3", ext3_defaults, ext3_allow, NULL, NULL }, | ||
| 60 | + { "ext4", ext4_defaults, ext4_allow, NULL, NULL }, | ||
| 61 | }; | ||
| 62 | |||
| 63 | /* ------------------------------------------------ */ | ||
diff --git a/meta-oe/recipes-support/udisks/udisks2_git.bb b/meta-oe/recipes-support/udisks/udisks2_git.bb index c4d0fa75ee..58c8a9899a 100644 --- a/meta-oe/recipes-support/udisks/udisks2_git.bb +++ b/meta-oe/recipes-support/udisks/udisks2_git.bb | |||
| @@ -18,6 +18,7 @@ RDEPENDS_${PN} = "acl" | |||
| 18 | 18 | ||
| 19 | SRC_URI = " \ | 19 | SRC_URI = " \ |
| 20 | git://github.com/storaged-project/udisks.git;branch=master;protocol=https \ | 20 | git://github.com/storaged-project/udisks.git;branch=master;protocol=https \ |
| 21 | file://CVE-2021-3802.patch \ | ||
| 21 | " | 22 | " |
| 22 | PV = "2.8.4+git${SRCREV}" | 23 | PV = "2.8.4+git${SRCREV}" |
| 23 | SRCREV = "db5f487345da2eaa87976450ea51c2c465d9b82e" | 24 | SRCREV = "db5f487345da2eaa87976450ea51c2c465d9b82e" |
