diff -Nru ipmitool-1.8.18/debian/changelog ipmitool-1.8.18/debian/changelog --- ipmitool-1.8.18/debian/changelog 2023-03-28 04:50:19.000000000 +1300 +++ ipmitool-1.8.18/debian/changelog 2023-07-13 15:23:17.000000000 +1200 @@ -1,3 +1,13 @@ +ipmitool (1.8.18-8ubuntu0.2) focal; urgency=medium + + * Fix persistent boot options when multiple options are set. Previously + flags were wiped out due to a logic error, leaving only the final flag + set. This set of patches ensures that all flags are set correctly. + (LP: #2017701) + - d/p/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch + + -- Matthew Ruffell Thu, 13 Jul 2023 15:23:17 +1200 + ipmitool (1.8.18-8ubuntu0.1) focal-security; urgency=medium * SECURITY UPDATE: Buffer Overflow diff -Nru ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch --- ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch 1970-01-01 12:00:00.000000000 +1200 +++ ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch 2023-07-13 15:23:12.000000000 +1200 @@ -0,0 +1,31 @@ +Author: Alexander Amelkin +Author: Matthew Ruffell +Date: Wed, 6 Nov 2019 11:40:15 +0300 +Subject: chassis: bootparam/bootdev: Refactor for less magic + Fix resetting of all other boot flags in the data byte when + setting any of the bits in the same byte. This fixes inability + to set both 'efiboot' and 'persistent' bits at the same time, + and other similar cases. + + Resolves ipmitool/ipmitool#163 + [mruffell: backport only the logic change to fix the actual issue + where all flags were being clobbered instead of clearing the bit + being set.] +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2017701 +Bug: https://github.com/ipmitool/ipmitool/issues/163 +Origin: backport, https://github.com/ipmitool/ipmitool/commit/4b89f1b42d94a9bb96093d5e5237c7f1cfd84580 +Last-Update: 2023-07-13 + +Index: ipmitool-1.8.18/lib/ipmi_chassis.c +=================================================================== +--- ipmitool-1.8.18.orig/lib/ipmi_chassis.c 2023-07-13 15:23:07.955977812 +1200 ++++ ipmitool-1.8.18/lib/ipmi_chassis.c 2023-07-13 15:23:07.951977772 +1200 +@@ -1354,7 +1354,7 @@ + } + for (op = options; op->name != NULL; ++op) { + if (strcmp(token, op->name) == 0) { +- flags[op->i] &= op->mask; ++ flags[op->i] &= ~(op->mask); + flags[op->i] |= op->value; + break; + } diff -Nru ipmitool-1.8.18/debian/patches/series ipmitool-1.8.18/debian/patches/series --- ipmitool-1.8.18/debian/patches/series 2023-03-08 12:37:12.000000000 +1300 +++ ipmitool-1.8.18/debian/patches/series 2023-07-13 15:23:02.000000000 +1200 @@ -17,3 +17,4 @@ CVE-2020-5208_4-channel-Fix-buffer-overflow.patch CVE-2020-5208_5_lanp-Fix-buffer-overflows-in-get_lan_param_select.patch CVE-2020-5208_6-fru-sdr-Fix-id_string-buffer-overflows.patch +lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch