import CS libblockdev-2.28-16.el9

This commit is contained in:
AlmaLinux RelEng Bot 2026-03-30 10:38:24 -04:00
parent fbaddf7982
commit 53564ce167
4 changed files with 122 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 2118ed49dcf6adf60c6c544667dbf71c54239b86 Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Fri, 16 May 2025 14:27:10 +0200
Subject: [PATCH] Don't allow suid and dev set on fs resize
Fixes: CVE-2025-6019
---
src/plugins/fs/generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/fs/generic.c b/src/plugins/fs/generic.c
index ca08d19a..15b55271 100644
--- a/src/plugins/fs/generic.c
+++ b/src/plugins/fs/generic.c
@@ -409,7 +409,7 @@ static gboolean xfs_resize_device (const gchar *device, guint64 new_size, const
"before resizing it.", device);
return FALSE;
}
- ret = bd_fs_mount (device, mountpoint, "xfs", NULL, NULL, error);
+ ret = bd_fs_mount (device, mountpoint, "xfs", "nosuid,nodev", NULL, error);
if (!ret) {
g_prefix_error (error, "Failed to mount '%s' before resizing it: ", device);
return FALSE;
--
2.49.0

View File

@ -0,0 +1,48 @@
From 21ff65eb84f4d1d498726712a8dbf703ac97f649 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 4 Sep 2025 15:51:35 +0200
Subject: [PATCH] lvm-dbus: Fix calling lvcreate with empty list of PVs
GLib really dislikes us calling 'g_variant_builder_end' on the
empty array in this case.
Resolves: RHEL-113928
---
src/plugins/lvm-dbus.c | 2 +-
tests/lvm_dbus_tests.py | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/plugins/lvm-dbus.c b/src/plugins/lvm-dbus.c
index a129d884..b5317b0d 100644
--- a/src/plugins/lvm-dbus.c
+++ b/src/plugins/lvm-dbus.c
@@ -2061,7 +2061,7 @@ gboolean bd_lvm_lvcreate (const gchar *vg_name, const gchar *lv_name, guint64 si
GVariant *extra_params = NULL;
/* build the array of PVs (object paths) */
- if (pv_list) {
+ if (pv_list && *pv_list) {
g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
for (pv=pv_list; *pv; pv++) {
path = get_object_path (*pv, error);
diff --git a/tests/lvm_dbus_tests.py b/tests/lvm_dbus_tests.py
index bc8b3052..0a91f224 100644
--- a/tests/lvm_dbus_tests.py
+++ b/tests/lvm_dbus_tests.py
@@ -725,6 +725,13 @@ class LvmTestLVcreateRemove(LvmPVVGLVTestCase):
succ = BlockDev.lvm_lvremove("testVG", "testLV", True, None)
self.assertTrue(succ)
+ # no PVs specified
+ succ = BlockDev.lvm_lvcreate("testVG", "testLV", 512 * 1024**2, None, [], None)
+ self.assertTrue(succ)
+
+ succ = BlockDev.lvm_lvremove("testVG", "testLV", True, None)
+ self.assertTrue(succ)
+
# not enough space (only one PV)
with six.assertRaisesRegex(self, GLib.GError, "Insufficient free space"):
succ = BlockDev.lvm_lvcreate("testVG", "testLV", 1048 * 1024**2, None, [self.loop_dev], None)
--
2.50.1

View File

@ -0,0 +1,32 @@
From e00b55532172ef6ba6e70e86d27ae76661567a98 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Wed, 29 Oct 2025 15:49:20 +0100
Subject: [PATCH] tests: Adjust sizes in generic FS resize test for VFAT resize
Similar change to e75820f -- when shrinking, libparted can change
FAT from FAT32 to FAT16 but it can't change from FAT16 to FAT32
when growing so we can't shrink (V)FAT below FAT32 minimal size
in our tests if we want to grow it back.
---
tests/fs_test.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/fs_test.py b/tests/fs_test.py
index 7b5a6ac1..42140097 100644
--- a/tests/fs_test.py
+++ b/tests/fs_test.py
@@ -1562,12 +1562,12 @@ def _test_generic_resize(self, mkfs_function, fs_info_func=None, info_size_func=
size = info_size_func(fs_info_func(self.loop_dev))
# shrink
- succ = BlockDev.fs_resize(self.loop_dev, 80 * 1024**2)
+ succ = BlockDev.fs_resize(self.loop_dev, 130 * 1024**2)
self.assertTrue(succ)
if info_size_func is not None and fs_info_func is not None:
new_size = info_size_func(fs_info_func(self.loop_dev))
# do not check the size 100% precisely there may differences due to FS block size, etc.
- self.assertEqual(new_size, 80 * 1024**2)
+ self.assertEqual(new_size, 130 * 1024**2)
# resize to maximum size
succ = BlockDev.fs_resize(self.loop_dev, 0)

View File

@ -129,7 +129,7 @@
Name: libblockdev
Version: 2.28
Release: 13%{?dist}
Release: 16%{?dist}
Summary: A library for low-level manipulation with block devices
License: LGPLv2+
URL: https://github.com/storaged-project/libblockdev
@ -150,6 +150,9 @@ Patch12: 0012-lvm-Add-support-for-starting-and-stopping-VG-locking.patch
Patch13: 0013-tests-Remove_unreliable_nvme_attribute_checks.patch
Patch14: 0014-nvme-Add-bd_nvme_is_tech_avail-to-the-API-file.patch
Patch15: 0015-crypto-Add-a-function-to-set-persistent-flags-for-LU.patch
Patch16: 0016-Don-t-allow-suid-and-dev-set-on-fs-resize.patch
Patch17: 0017-lvm-dbus-Fix-calling-lvcreate-with-empty-list-of-PVs.patch
Patch18: 0018-Adjust-sizes-in-generic-FS-resize-test-for-VFAT-resize.patch
BuildRequires: make
BuildRequires: glib2-devel
@ -1048,6 +1051,18 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%files plugins-all
%changelog
* Thu Oct 30 2025 Vojtech Trefny <vtrefny@redhat.com> - 2.28-16
- tests: Adjust sizes in generic FS resize test for VFAT resize
Resolves: RHEL-124142
* Mon Oct 06 2025 Vojtech Trefny <vtrefny@redhat.com> - 2.28-15
- lvm-dbus: Fix calling lvcreate with empty list of PVs
Resolves: RHEL-113928
* Mon Jun 23 2025 Vojtech Trefny <vtrefny@redhat.com> - 2.28-14
- Don't allow suid and dev set on fs resize
Resolves: RHEL-96039
* Tue Mar 11 2025 Vojtech Trefny <vtrefny@redhat.com> - 2.28-13
- crypto: Add a function to set persistent flags for LUKS
Resolves: RHEL-82886