diff options
Diffstat (limited to 'sys-boot/efibootmgr')
-rw-r--r-- | sys-boot/efibootmgr/Manifest | 3 | ||||
-rw-r--r-- | sys-boot/efibootmgr/efibootmgr-18-r2.ebuild (renamed from sys-boot/efibootmgr/efibootmgr-18-r1.ebuild) | 6 | ||||
-rw-r--r-- | sys-boot/efibootmgr/files/efibootmgr-18-backports.patch | 76 |
3 files changed, 83 insertions, 2 deletions
diff --git a/sys-boot/efibootmgr/Manifest b/sys-boot/efibootmgr/Manifest index 942d537651b5..3321b602c5e2 100644 --- a/sys-boot/efibootmgr/Manifest +++ b/sys-boot/efibootmgr/Manifest @@ -1,7 +1,8 @@ AUX efibootmgr-17-clang.patch 3460 BLAKE2B 645f9ba570adadb73e4673ce221631f25b73603d2bbc235f8f48544f7db0445f0b50f415ba90d3a2726948a23d56469c1ad146ae753b6782de3447d6f79fe118 SHA512 ab7f8911f209c9ba84dcebbc7fba88e7866c4800d8eac15a23b4c36dfada594ba900d4f6d4afc68a895fda3d350e42ef02f946bef061e0f331e5b6db6507209d AUX efibootmgr-17-fix-efivar-37-conflict.patch 508 BLAKE2B 84cf90508627a587b414f7fc2067b0a1417d68344de0ca3a4a3acc54bc94a6dc84e7d22d1261a777a0cbc7233715de0acd5e56474572f0b9d473da57a29a7dd5 SHA512 a8f4b37e9c0c55a3b2d20f733606653add0219066b9a46b0878885023480747936ad015a52363ceece481ae4d8b702aaa710d9fde2334aae48f97f650416e129 +AUX efibootmgr-18-backports.patch 2443 BLAKE2B d86bf20696fa7fcaf65ed5fb667ce8d8b0a7aeaf9d8275259e084180d2783b6203d5a8355aa31b97b111a8b3fb4408c0ef86b0abc0901ffb9e56933082f85226 SHA512 2859e09b5c1c72f8c85c961658662aac5c26f20b5a1c0429a424d0eb9834d6fdd168404a7691c3b850544762dab325108b80ec1cf628c3cacddc46a2d96ee4a9 DIST efibootmgr-17.tar.gz 41643 BLAKE2B a1995a5df74766f762d2eb971fd6095edea8d0a498c9dd1100515866b40c38ae2f299aae51f12767850ec23fbe4709c2c7428dd48755fbec499669b69f6432c9 SHA512 10c7ad9a79f23dcd4708dc4f42701196af7aa11f5e9a6468ea51f7013d4caeba6c92527ba1304f6e3b2ef3b51b3b69ea1a30f81bb099a8aea49eeb30eb631e1d DIST efibootmgr-18.tar.gz 45220 BLAKE2B 6bc3f39ee395d2045e78b19876fd9404ba41443259e9ad7446671d768a63dc1418d5a192600392fd95251159d80479008a2c22b4cd503bba2f4a869850cb3652 SHA512 04e40a705cb82440fd823043b598ef9fd1acc2ceda3e8d043a93e49d43ea9481b7386cad0f46de9862beff19b8a5480d79e7d6522ae584aff6655472f967764d EBUILD efibootmgr-17-r1.ebuild 817 BLAKE2B e6f59cf80fed18d1d77be0c4c5f44b0c6a70e9ab544af9eca10bc9247852e6a05e8d4d39414f2241f1cf7f0cb4257a685961ec0e837998fdcbc976dd82c24bb9 SHA512 91b222c14e92221154c9fb54010a4699236a65b7a9acb69549a5efe489fb09c07a2a634de466f830f9e75ccd9cca1c002cd68d3efbc8a58b515692e6cb19ee10 -EBUILD efibootmgr-18-r1.ebuild 722 BLAKE2B 7b2ddfea7047334c8b75eaea8c2bab7598cb2bc5477ed3fa09762e432709a7e985a9a7e998be63c050b3897ea52b0f9d50d04bd66e7475c5024944454f0087e9 SHA512 b33c14cf0c986276f6a0b91ee9981a1cfa9972e0773992b73767e9fb12e52b89784d9af1d46af46d123251b32ecc8740b4585fb1568f9e7793a22f09ff2436b0 +EBUILD efibootmgr-18-r2.ebuild 780 BLAKE2B ce404d0d81e37384df62a43d586bb0cefed10dea9643f4fe746d431848593b780967dc99bde94efe576ee4503078af5b632c3ecc530cccdb36fb0321fd39395d SHA512 891d46f1476dbcad29543ee795cd396034c4ac9f00d23d8773ed4ec2c8129e2ec36b83637287b5af8f88455c9192d8508056e7e2f33a291e5c22bad917322eac MISC metadata.xml 627 BLAKE2B 87bce38f4ea3c37516d8105815c32ea390489ca19bbaca4da5c4e591b290fa9f02bce477d651aa2f87635ea7be7ef7074db5df3ca814064d7e64c7ae310080f7 SHA512 5d2acbc46a88561df48438009780d8e6dbe0244800e0e8b1b00e1e0c5d23045410319e4e31a7c1875213aa46e0ae9eea2423c5e971256dbb223f62e9ed6a0614 diff --git a/sys-boot/efibootmgr/efibootmgr-18-r1.ebuild b/sys-boot/efibootmgr/efibootmgr-18-r2.ebuild index 7ff93176d029..c2d815de8d80 100644 --- a/sys-boot/efibootmgr/efibootmgr-18-r1.ebuild +++ b/sys-boot/efibootmgr/efibootmgr-18-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -21,6 +21,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}"/efibootmgr-18-backports.patch +) + src_prepare() { default sed -i 's/-Werror //' Make.defaults || die diff --git a/sys-boot/efibootmgr/files/efibootmgr-18-backports.patch b/sys-boot/efibootmgr/files/efibootmgr-18-backports.patch new file mode 100644 index 000000000000..70422efd1165 --- /dev/null +++ b/sys-boot/efibootmgr/files/efibootmgr-18-backports.patch @@ -0,0 +1,76 @@ +From dcd232d0458b962627f727dc8a1cef3c000a5bf4 Mon Sep 17 00:00:00 2001 +From: kmicki <1463619+kmicki@users.noreply.github.com> +Date: Tue, 15 Nov 2022 14:37:25 +0100 +Subject: [PATCH] Update efibootmgr.c + +get_entry: return entry if it was found before reaching the end of the list + +Signed-off-by: kmicki <1463619+kmicki@users.noreply.github.com> +--- + src/efibootmgr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index b980bcd..4b15d6d 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -1192,6 +1192,7 @@ get_entry(list_t *entries, uint16_t num) + entry = NULL; + continue; + } ++ return entry; + } + + return entry; +From c2ef7876f4cc0ad5a52f40577e7636a841100bec Mon Sep 17 00:00:00 2001 +From: kamillo <kamilgolunski@gmail.com> +Date: Fri, 17 Feb 2023 21:55:17 +0100 +Subject: [PATCH 1/2] Add missing short option handling for --index (-I) + +Signed-off-by: kamillo <kamilgolunski@gmail.com> +--- + src/efibootmgr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index 4b15d6d..255f61f 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -1509,7 +1509,7 @@ parse_opts(int argc, char **argv) + }; + + c = getopt_long(argc, argv, +- "aAb:BcCd:De:E:fFgi:kl:L:m:M:n:No:Op:qrt:Tuv::Vwy@:h", ++ "aAb:BcCd:De:E:fFgi:I:kl:L:m:M:n:No:Op:qrt:Tuv::Vwy@:h", + long_options, &option_index); + if (c == -1) + break; + +From fe0a2c9569bd22e51000081226998419cb07c6ce Mon Sep 17 00:00:00 2001 +From: kamillo <kamilgolunski@gmail.com> +Date: Fri, 17 Feb 2023 22:02:22 +0100 +Subject: [PATCH 2/2] Fix segfault when passed --index is greater than current + boot order size + +Size of the order entry size (uint16_t) hasn't been taken into account for all calculations and caused memory corruption. + +Signed-off-by: kamillo <kamilgolunski@gmail.com> +--- + src/efibootmgr.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index 255f61f..ded21a1 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -420,8 +420,8 @@ add_to_order(const char *name, uint16_t num, uint16_t insert_at) + return -1; + + if (insert_at != 0) { +- if (insert_at > order->data_size) +- insert_at = order->data_size; ++ if (insert_at * sizeof(uint16_t) > order->data_size) ++ insert_at = order->data_size / sizeof(uint16_t); + memcpy(new_data, old_data, insert_at * sizeof(uint16_t)); + } + new_data[insert_at] = num; |