diff options
| author | Changqing Li <changqing.li@windriver.com> | 2025-07-03 19:03:29 +0800 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2025-07-13 14:35:51 -0400 |
| commit | c2645698cb4f9559bb72cbc48a5f55eb808927a9 (patch) | |
| tree | 0f6254bd6a890c591a459057ecf271b192941bd0 | |
| parent | e73af91ee37e49fe8beea0a25bf703d05ed4be18 (diff) | |
| download | meta-openembedded-c2645698cb4f9559bb72cbc48a5f55eb808927a9.tar.gz | |
udisks2: Hardening measure of CVE-2025-6019
Refer [1], CVE-2025-6019 is strongly related to udisk daemon, and
this is a hardening measure related to this.
[1] https://cdn2.qualys.com/2025/06/17/suse15-pam-udisks-lpe.txt
[2] https://security-tracker.debian.org/tracker/CVE-2025-6019
[3] https://ubuntu.com/blog/udisks-libblockdev-lpe-vulnerability-fixes-available
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch | 51 | ||||
| -rw-r--r-- | meta-oe/recipes-support/udisks/udisks2_2.9.4.bb | 3 |
2 files changed, 53 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch b/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch new file mode 100644 index 0000000000..2e94c8497f --- /dev/null +++ b/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From d0d04a381036b79df91616552706d515639bb762 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tomas Bzatek <tbzatek@redhat.com> | ||
| 3 | Date: Wed, 4 Jun 2025 15:26:46 +0200 | ||
| 4 | Subject: [PATCH] udiskslinuxfilesystemhelpers: Mount private mounts with | ||
| 5 | 'nodev,nosuid' | ||
| 6 | |||
| 7 | The private mount done in take_filesystem_ownership() should always | ||
| 8 | default to 'nodev,nosuid' for security and 'errors=remount-ro' for | ||
| 9 | selected filesystem types to handle an corrupted filesystem. This is | ||
| 10 | consistent with mount options calculation for regular mounts. | ||
| 11 | |||
| 12 | CVE: CVE-2025-6019 | ||
| 13 | Upstream-Status: Backport [ https://github.com/storaged-project/udisks/commit/5e7277debea926370e587408517560afe87d28c9 ] | ||
| 14 | |||
| 15 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 16 | --- | ||
| 17 | src/udiskslinuxfilesystemhelpers.c | 10 +++++++++- | ||
| 18 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/src/udiskslinuxfilesystemhelpers.c b/src/udiskslinuxfilesystemhelpers.c | ||
| 21 | index 7c5fc037..9eb7742c 100644 | ||
| 22 | --- a/src/udiskslinuxfilesystemhelpers.c | ||
| 23 | +++ b/src/udiskslinuxfilesystemhelpers.c | ||
| 24 | @@ -123,6 +123,7 @@ take_filesystem_ownership (const gchar *device, | ||
| 25 | |||
| 26 | { | ||
| 27 | gchar *mountpoint = NULL; | ||
| 28 | + const gchar *mount_opts; | ||
| 29 | GError *local_error = NULL; | ||
| 30 | gboolean unmount = FALSE; | ||
| 31 | gboolean success = TRUE; | ||
| 32 | @@ -151,8 +152,15 @@ take_filesystem_ownership (const gchar *device, | ||
| 33 | goto out; | ||
| 34 | } | ||
| 35 | |||
| 36 | + mount_opts = "nodev,nosuid"; | ||
| 37 | + if (g_strcmp0 (fstype, "ext2") == 0 || | ||
| 38 | + g_strcmp0 (fstype, "ext3") == 0 || | ||
| 39 | + g_strcmp0 (fstype, "ext4") == 0 || | ||
| 40 | + g_strcmp0 (fstype, "jfs") == 0) | ||
| 41 | + mount_opts = "nodev,nosuid,errors=remount-ro"; | ||
| 42 | + | ||
| 43 | /* TODO: mount to a private mount namespace */ | ||
| 44 | - if (!bd_fs_mount (device, mountpoint, fstype, NULL, NULL, &local_error)) | ||
| 45 | + if (!bd_fs_mount (device, mountpoint, fstype, mount_opts, NULL, &local_error)) | ||
| 46 | { | ||
| 47 | g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, | ||
| 48 | "Cannot mount %s at %s: %s", | ||
| 49 | -- | ||
| 50 | 2.34.1 | ||
| 51 | |||
diff --git a/meta-oe/recipes-support/udisks/udisks2_2.9.4.bb b/meta-oe/recipes-support/udisks/udisks2_2.9.4.bb index 3de5557238..10d564658c 100644 --- a/meta-oe/recipes-support/udisks/udisks2_2.9.4.bb +++ b/meta-oe/recipes-support/udisks/udisks2_2.9.4.bb | |||
| @@ -17,7 +17,8 @@ DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | |||
| 17 | 17 | ||
| 18 | RDEPENDS:${PN} = "acl" | 18 | RDEPENDS:${PN} = "acl" |
| 19 | 19 | ||
| 20 | SRC_URI = "git://github.com/storaged-project/udisks.git;branch=2.9.x-branch;protocol=https" | 20 | SRC_URI = "git://github.com/storaged-project/udisks.git;branch=2.9.x-branch;protocol=https \ |
| 21 | file://CVE-2025-6019.patch " | ||
| 21 | SRCREV = "001c486e6d099ed33e2de4f5c73c03e3ee180f81" | 22 | SRCREV = "001c486e6d099ed33e2de4f5c73c03e3ee180f81" |
| 22 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
| 23 | 24 | ||
