diff --git a/backport-cfdisk-add-hint-about-labels-for-bootable-flag.patch b/backport-cfdisk-add-hint-about-labels-for-bootable-flag.patch new file mode 100644 index 0000000..2c1dc08 --- /dev/null +++ b/backport-cfdisk-add-hint-about-labels-for-bootable-flag.patch @@ -0,0 +1,46 @@ +From 793e8d2ab81324d0a712132b26ee16c08575101b Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 12 Jun 2023 12:33:01 +0200 +Subject: [PATCH] cfdisk: add hint about labels for bootable flag + +Addresses: https://github.com/util-linux/util-linux/discussions/2220 +Signed-off-by: Karel Zak +--- + disk-utils/cfdisk.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c +index 5f4de8b48..2e29421d7 100644 +--- a/disk-utils/cfdisk.c ++++ b/disk-utils/cfdisk.c +@@ -1,7 +1,7 @@ + /* + * cfdisk.c - Display or manipulate a disk partition table. + * +- * Copyright (C) 2014-2015 Karel Zak ++ * Copyright (C) 2014-2023 Karel Zak + * Copyright (C) 1994 Kevin E. Martin (martin@cs.unc.edu) + * + * The original cfdisk was inspired by the fdisk program +@@ -2257,7 +2257,8 @@ static int ui_help(void) + " ", + N_("Command Meaning"), + N_("------- -------"), +- N_(" b Toggle bootable flag of the current partition"), ++ N_(" b Toggle bootable flag of the current partition;"), ++ N_(" implemented for DOS (MBR) and SGI labels only"), + N_(" d Delete the current partition"), + N_(" h Print this screen"), + N_(" n Create new partition from free space"), +@@ -2281,7 +2282,7 @@ static int ui_help(void) + N_("Use lsblk(8) or partx(8) to see more details about the device."), + " ", + " ", +- "Copyright (C) 2014-2017 Karel Zak " ++ "Copyright (C) 2014-2023 Karel Zak " + }; + + erase(); +-- +2.33.0 + diff --git a/backport-libblkid-jfs-avoid-undefined-shift.patch b/backport-libblkid-jfs-avoid-undefined-shift.patch new file mode 100644 index 0000000..c63a172 --- /dev/null +++ b/backport-libblkid-jfs-avoid-undefined-shift.patch @@ -0,0 +1,35 @@ +From 665ac314c3f16afd1f1ed247b96e9136452ddd9e Mon Sep 17 00:00:00 2001 +From: Milan Broz +Date: Sun, 4 Jun 2023 19:15:55 +0200 +Subject: [PATCH] libblkid: jfs - avoid undefined shift + +Fix previous commit 04a0717b0b0faa1a8078dc6fad05183b8bada395 +to avoid undefined shift if value is exactly 32. + + libblkid/src/superblocks/jfs.c:46:39: runtime error: + shift exponent 32 is too large for 32-bit type 'unsigned int' + +Reproducer found with OSS-Fuzz (issue 59284) running over +cryptsetup project (blkid is used in header init). + +Signed-off-by: Milan Broz +--- + libblkid/src/superblocks/jfs.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libblkid/src/superblocks/jfs.c b/libblkid/src/superblocks/jfs.c +index 3de8c2e..bf03b21 100644 +--- a/libblkid/src/superblocks/jfs.c ++++ b/libblkid/src/superblocks/jfs.c +@@ -41,6 +41,8 @@ static int probe_jfs(blkid_probe pr, const struct blkid_idmag *mag) + js = blkid_probe_get_sb(pr, mag, struct jfs_super_block); + if (!js) + return errno ? -errno : 1; ++ if (le16_to_cpu(js->js_l2bsize) > 31 || le16_to_cpu(js->js_l2pbsize) > 31) ++ return 1; + if (le32_to_cpu(js->js_bsize) != (1U << le16_to_cpu(js->js_l2bsize))) + return 1; + if (le32_to_cpu(js->js_pbsize) != (1U << le16_to_cpu(js->js_l2pbsize))) +-- +2.33.0 + diff --git a/backport-logger-initialize-socket-credentials-contol-union.patch b/backport-logger-initialize-socket-credentials-contol-union.patch new file mode 100644 index 0000000..436c0a4 --- /dev/null +++ b/backport-logger-initialize-socket-credentials-contol-union.patch @@ -0,0 +1,27 @@ +From 3a4d70419c97f64f60c0eda4720e64d17b3b0714 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 26 Jun 2023 11:56:23 +0200 +Subject: [PATCH] logger: initialize socket credentials contol union + +Addresses: https://github.com/util-linux/util-linux/issues/2336 +Signed-off-by: Karel Zak +--- + misc-utils/logger.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc-utils/logger.c b/misc-utils/logger.c +index e2b0b41ab..8174d55e0 100644 +--- a/misc-utils/logger.c ++++ b/misc-utils/logger.c +@@ -471,7 +471,7 @@ static void write_output(struct logger_ctl *ctl, const char *const msg) + union { + struct cmsghdr cmh; + char control[CMSG_SPACE(sizeof(struct ucred))]; +- } cbuf; ++ } cbuf = { .control = { 0 } }; + #endif + + /* 4) add extra \n to make sure message is terminated */ +-- +2.33.0 + diff --git a/util-linux.spec b/util-linux.spec index 22e4c20..d4d0008 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Name: util-linux Version: 2.37.2 -Release: 20 +Release: 21 Summary: A random collection of Linux utilities License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git @@ -106,6 +106,9 @@ Patch6084: backport-sulogin-ignore-none-existing-console-devices.patch Patch6085: backport-sulogin-fix-KDGKBMODE-ifdef.patch Patch6086: backport-unshare-Move-implementation-of-keep-caps-option-to-l.patch Patch6087: backport-lib-caputils-fix-integer-handling-issues-coverity-sc.patch +Patch6088: backport-libblkid-jfs-avoid-undefined-shift.patch +Patch6089: backport-cfdisk-add-hint-about-labels-for-bootable-flag.patch +Patch6090: backport-logger-initialize-socket-credentials-contol-union.patch Patch9000: Add-check-to-resolve-uname26-version-test-failed.patch Patch9001: SKIPPED-no-root-permissions-test.patch @@ -477,6 +480,15 @@ fi %{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*} %changelog +* Thu Aug 3 2023 zhangyao - 2.37.2-21 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:sync community patches + [add]backport-libblkid-jfs-avoid-undefined-shift.patch + backport-cfdisk-add-hint-about-labels-for-bootable-flag.patch + backport-logger-initialize-socket-credentials-contol-union.patch + * Thu Jun 15 2023 zhangyao - 2.37.2-20 - Type:bugfix - CVE:NA