Source: grub2
Version: 2.12-8
Severity: serious
Tags: patch
Justification: Appendix "8.2" - Violates outcome of 2019 GR
X-Debbugs-Cc: prowle...@gmail.com

Dear Maintainer,

Please revert the deletion of patch mkconfig-other-inits.patch'
I can't see justification for this to be removed (eg closes bug xxx), either on
git or through the changelog.


Refer to discussion here:

https://salsa.debian.org/grub-
team/grub/-/commit/bdc71248132521f3d0fb506e84b478be349fbcae#57fc750524807a0da244e17a3a27a57bf55ba59d

It shouldn't be acceptable to remove perfectly working code that Debian
derivatives (such as antiX & MX) utilise to offer exploration of alternative
inits.
Please accept - examine & apply my proposed patch (included) to close this out


-- System Information:
Debian Release: 13.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.236-antix.1-amd64-smp (SMP w/4 CPU threads)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
From: Colin Watson <cjwat...@debian.org>
Date: Sat, 3 Jan 2015 12:04:59 +0000
Subject: Generate alternative init entries in advanced menu

Add fallback boot entries for alternative installed init systems.  Based
on patches from Michael Biebl and Didier Roche.

Bug-Debian: https://bugs.debian.org/757298
Bug-Debian: https://bugs.debian.org/773173
Forwarded: no
Last-Update: 2017-06-23

Patch-Name: mkconfig-other-inits.patch
Last-Update: 2025-06-20

--- grub2-2.12.orig/util/grub.d/10_linux.in
+++ grub2-2.12/util/grub.d/10_linux.in
@@ -32,6 +32,7 @@ export TEXTDOMAIN=@PACKAGE@
 export TEXTDOMAINDIR="@localedir@"
 
 CLASS="--class gnu-linux --class gnu --class os"
+SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd 
upstart:/sbin/upstart s6-rc:/lib/s6-rc/s6-rc-init s6-66:/lib/s6-66/s6-66-init 
openrc:/lib/openrc/openrc-init runit:/lib/runit/runit-init 
dinit:/lib/dinit/dinit shepherd:/lib/shepherd/shepherd"
 
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
   OS=GNU/Linux
@@ -395,6 +396,13 @@ for linux in ${reverse_sorted_list}; do
 
   linux_entry "${OS}" "${version}" advanced \
               "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+  for supported_init in ${SUPPORTED_INITS}; do
+    init_path="${supported_init#*:}"
+    if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != "$(readlink 
-f "${init_path}")" ]; then
+      linux_entry "${OS}" "${version}" "init-${supported_init%%:*}" \
+                 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} 
init=${init_path}"
+    fi
+  done
   if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
     linux_entry "${OS}" "${version}" recovery \
                 "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
--- grub2-2.12.orig/util/grub.d/20_linux_xen.in
+++ grub2-2.12/util/grub.d/20_linux_xen.in
@@ -27,6 +27,7 @@ export TEXTDOMAIN=@PACKAGE@
 export TEXTDOMAINDIR="@localedir@"
 
 CLASS="--class gnu-linux --class gnu --class os --class xen"
+SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd 
upstart:/sbin/upstart"
 
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
   OS=GNU/Linux
@@ -366,6 +367,14 @@ for current_xen in ${reverse_sorted_xen_
 
        linux_entry "${OS}" "${version}" "${xen_version}" advanced \
            "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" 
"${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+       for supported_init in ${SUPPORTED_INITS}; do
+           init_path="${supported_init#*:}"
+           if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != 
"$(readlink -f "${init_path}")" ]; then
+               linux_entry "${OS}" "${version}" "${xen_version}" 
"init-${supported_init%%:*}" \
+                   "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} 
init=${init_path}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+
+           fi
+       done
        if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
            linux_entry "${OS}" "${version}" "${xen_version}" recovery \
                "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}" 
"${GRUB_CMDLINE_XEN}"
olpc-prefix-hack.patch
core-in-fs.patch
grub-legacy-0-based-partitions.patch
disable-floppies.patch
gfxpayload-keep-default.patch
install-stage2-confusion.patch
mkconfig-loopback.patch
restore-mkdevicemap.patch
gettext-quiet.patch
install-efi-fallback.patch
mkconfig-ubuntu-recovery.patch
install-locale-langpack.patch
mkconfig-nonexistent-loopback.patch
default-grub-d.patch
blacklist-1440x900x32.patch
mkconfig-distributor.patch
maybe-quiet.patch
install-efi-adjust-distributor.patch
quick-boot.patch
quick-boot-lvm.patch
gfxpayload-dynamic.patch
vt-handoff.patch
probe-fusionio.patch
ignore-grub_func_test-failures.patch
mkconfig-recovery-title.patch
install-powerpc-machtypes.patch
ieee1275-clear-reset.patch
ppc64el-disable-vsx.patch
grub-install-pvxen-paths.patch
insmod-xzio-and-lzopio-on-xen.patch
zpool-full-device-name.patch
network/net-http-check-result-of-grub_netbuff_put-in-http_receive.patch
network/bootp-new-net_bootp6-command.patch
network/efinet-add-structures-for-PXE-messages.patch
network/bootp-process-dhcpack-http-boot.patch
network/efinet-Configure-network-from-UEFI-device-path.patch
network/efinet-set-dns-from-uefi-proto.patch
network/support-uefi-networking-protocols.patch
network/efinet-also-use-the-firmware-acceleration-for-http.patch
network/efi-http-match-protocol-hostname-of-boot-url-in-root.patch
network/add-fw_path-variable-to-detect-config-file-on-efi.patch
network/use-fw_path-prefix-when-fallback-searching-for-grub-config.patch
network/try-prefixes-for-tftp-config-file.patch
network/prepend-prefix-when-http-path-is-relative.patch
network/efi-http-enclose-literal-ipv6-addresses-in-square-br.patch
network/http-prepend-prefix-when-the-http-path-is-relative.patch
network/discover-the-device-to-read-the-config-from-as-fallback.patch
network/efinet-add-dhcp-proxy-support.patch
network/rhboot-http-message-field-size.patch
skip-grub_cmd_set_date.patch
bash-completion-drop-have-checks.patch
at_keyboard-module-init.patch
uefi-secure-boot-cryptomount.patch
efi-variable-storage-minimise-writes.patch
xen-no-xsm-policy-in-non-xsm-options.patch
pc-verifiers-module.patch
debug_verifiers.patch
mkimage-fix-section-sizes.patch
987008-lvrename-boot-fail.patch
grub_os-prober.patch
secure-boot/revert-efi-fallback-to-legacy.patch
secure-boot/loader-framework.patch
secure-boot/efi-use-peimage-shim.patch
zstd-require-8-byte-buffer.patch
recovery-dis_ucode_ldr.patch
hwmatch-only-on-grub-pc-platform.patch
fat-fix-listing-the-root-directory.patch
efivar-check-that-efivarfs-is-writeable.patch
fdt-add-debug-output-to-devicetree-command.patch
fdt-device-tree-fixup-protocol.patch
extra_deps_lst.patch
upstream/acpi-Fix-out-of-bounds-access-in-grub_acpi_xsdt_find_tabl.patch
install-signed.patch
grub-install-extra-removable.patch
grub-install-removable-shim.patch
cve-2025-jan/misc-Implement-grub_strlcpy.patch
cve-2025-jan/fs-ufs-Fix-a-heap-OOB-write.patch
cve-2025-jan/fs-hfs-Fix-stack-OOB-write-with-grub_strcpy.patch
cve-2025-jan/fs-tar-Initialize-name-in-grub_cpio_find_file.patch
cve-2025-jan/fs-tar-Integer-overflow-leads-to-heap-OOB-write.patch
cve-2025-jan/fs-f2fs-Set-a-grub_errno-if-mount-fails.patch
cve-2025-jan/fs-hfsplus-Set-a-grub_errno-if-mount-fails.patch
cve-2025-jan/fs-iso9660-Set-a-grub_errno-if-mount-fails.patch
cve-2025-jan/fs-iso9660-Fix-invalid-free.patch
cve-2025-jan/fs-jfs-Fix-OOB-read-in-jfs_getent.patch
cve-2025-jan/fs-jfs-Fix-OOB-read-caused-by-invalid-dir-slot-index.patch
cve-2025-jan/fs-jfs-Use-full-40-bits-offset-and-address-for-a-data-ext.patch
cve-2025-jan/fs-jfs-Inconsistent-signed-unsigned-types-usage-in-return.patch
cve-2025-jan/fs-ext2-Fix-out-of-bounds-read-for-inline-extents.patch
cve-2025-jan/fs-xfs-Fix-out-of-bounds-read.patch
cve-2025-jan/fs-xfs-Ensuring-failing-to-mount-sets-a-grub_errno.patch
cve-2025-jan/kern-file-Ensure-file-data-is-set.patch
cve-2025-jan/kern-file-Implement-filesystem-reference-counting.patch
cve-2025-jan/disk-loopback-Reference-tracking-for-the-loopback.patch
cve-2025-jan/kern-disk-Limit-recursion-depth.patch
cve-2025-jan/kern-partition-Limit-recursion-in-part_iterate.patch
cve-2025-jan/script-execute-Limit-the-recursion-depth.patch
cve-2025-jan/net-Unregister-net_default_ip-and-net_default_mac-variabl.patch
cve-2025-jan/net-Remove-variables-hooks-when-interface-is-unregisted.patch
cve-2025-jan/net-Fix-OOB-write-in-grub_net_search_config_file.patch
cve-2025-jan/net-tftp-Fix-stack-buffer-overflow-in-tftp_open.patch
cve-2025-jan/video-readers-jpeg-Do-not-permit-duplicate-SOF0-markers-i.patch
cve-2025-jan/kern-dl-Fix-for-an-integer-overflow-in-grub_dl_ref.patch
cve-2025-jan/kern-dl-Check-for-the-SHF_INFO_LINK-flag-in-grub_dl_reloc.patch
cve-2025-jan/commands-extcmd-Missing-check-for-failed-allocation.patch
cve-2025-jan/commands-ls-Fix-NULL-dereference.patch
cve-2025-jan/commands-pgp-Unregister-the-check_signatures-hooks-on-mod.patch
cve-2025-jan/normal-Remove-variables-hooks-on-module-unload.patch
cve-2025-jan/gettext-Remove-variables-hooks-on-module-unload.patch
cve-2025-jan/gettext-Integer-overflow-leads-to-heap-OOB-write-or-read.patch
cve-2025-jan/gettext-Integer-overflow-leads-to-heap-OOB-write.patch
cve-2025-jan/commands-read-Fix-an-integer-overflow-when-supplying-more.patch
cve-2025-jan/commands-test-Stack-overflow-due-to-unlimited-recursion-d.patch
cve-2025-jan/commands-minicmd-Block-the-dump-command-in-lockdown-mode.patch
cve-2025-jan/commands-memrw-Disable-memory-reading-in-lockdown-mode.patch
cve-2025-jan/commands-hexdump-Disable-memory-reading-in-lockdown-mode.patch
cve-2025-jan/fs-bfs-Disable-under-lockdown.patch
cve-2025-jan/fs-Disable-many-filesystems-under-lockdown.patch
cve-2025-jan/disk-Use-safe-math-macros-to-prevent-overflows.patch
cve-2025-jan/disk-Prevent-overflows-when-allocating-memory-for-arrays.patch
cve-2025-jan/disk-Check-if-returned-pointer-for-allocated-memory-is-NU.patch
cve-2025-jan/disk-ieee1275-ofdisk-Call-grub_ieee1275_close-when-grub_m.patch
cve-2025-jan/fs-Use-safe-math-macros-to-prevent-overflows.patch
cve-2025-jan/fs-Prevent-overflows-when-allocating-memory-for-arrays.patch
cve-2025-jan/fs-Prevent-overflows-when-assigning-returned-values-from-.patch
cve-2025-jan/fs-zfs-Use-safe-math-macros-to-prevent-overflows.patch
cve-2025-jan/fs-zfs-Prevent-overflows-when-allocating-memory-for-array.patch
cve-2025-jan/fs-zfs-Check-if-returned-pointer-for-allocated-memory-is-.patch
cve-2025-jan/fs-zfs-Add-missing-NULL-check-after-grub_strdup-call.patch
cve-2025-jan/net-Use-safe-math-macros-to-prevent-overflows.patch
cve-2025-jan/net-Prevent-overflows-when-allocating-memory-for-arrays.patch
cve-2025-jan/net-Check-if-returned-pointer-for-allocated-memory-is-NUL.patch
cve-2025-jan/fs-sfs-Check-if-allocated-memory-is-NULL.patch
cve-2025-jan/script-execute-Fix-potential-underflow-and-NULL-dereferen.patch
cve-2025-jan/osdep-unix-getroot-Fix-potential-underflow.patch
cve-2025-jan/misc-Ensure-consistent-overflow-error-messages.patch
cve-2025-jan/bus-usb-ehci-Define-GRUB_EHCI_TOGGLE-as-grub_uint32_t.patch
cve-2025-jan/normal-menu-Use-safe-math-to-avoid-an-integer-overflow.patch
cve-2025-jan/kern-partition-Add-sanity-check-after-grub_strtoul-call.patch
cve-2025-jan/kern-misc-Add-sanity-check-after-grub_strtoul-call.patch
cve-2025-jan/loader-i386-linux-Cast-left-shift-to-grub_uint32_t.patch
cve-2025-jan/loader-i386-bsd-Use-safe-math-to-avoid-underflow.patch
cve-2025-jan/fs-ext2-Rework-out-of-bounds-read-for-inline-and-external.patch
cve-2025-jan/fs-xfs-Fix-grub_xfs_iterate_dir-return-value-in-case-of-f.patch
cve-2025-jan/fs-xfs-Propagate-incorrect-inode-error-from-grub_xfs_read.patch
cve-2025-jan/fs-xfs-Handle-root-inode-read-failure-in-grub_xfs_mount.patch
mkconfig-other-inits.patch

Reply via email to