Commit Graph

158 Commits

Author SHA1 Message Date
Felix Buehler
c0e4a932cd trustedGrub: switch to fetchFromGitHub 2022-03-14 19:32:49 +01:00
Sandro
64a3fb4713
Merge pull request #146927 from trofi/fix-grub2-on-binutils-2.36 2022-02-08 03:16:24 +01:00
Robert Schütz
d5cceedbd1 python,pythonPackages: make aliases
Since aliases are disallowed in nixpkgs, this makes usage of Python 2
which is EOL more explicit.
2022-01-16 18:39:59 +00:00
github-actions[bot]
941a6593c8
Merge master into staging-next 2021-11-30 00:01:51 +00:00
Artturin
8191c8e226 grub2: fix buildPackage bash shebang 2021-11-27 06:19:49 +02:00
Artturin
76e515cb26 grub2: switch to release tarball
for the localization files
2021-11-27 05:41:34 +02:00
Sergei Trofimovich
65c327d4b6 grub2_xen: pull upstream fix for binutils-2.36
Without the change linkage on binutils-2.36 fails as:

    ld: section .note.gnu.property VMA [0000000000400158,0000000000400187]
      overlaps section .bss VMA [000000000000f000,000000000041e1b7]
2021-11-21 21:06:53 +00:00
Victor Engmark
57b496ea98 misc: Replace tab indentation with spaces
I've tried to be consistent, using four or eight spaces to line up
with existing code.
2021-11-14 16:04:46 +13:00
github-actions[bot]
c435b0e35f
Merge master into staging-next 2021-09-11 18:01:16 +00:00
Sergei Trofimovich
1d7917e64e trustedGrub, trustedGrub-for-HP: apply upstream fix for fresh glibc 2021-09-11 13:19:47 +01:00
Felix Buehler
999758f9e6 grub: replace name with pname&version 2021-08-01 23:48:52 +02:00
ajs124
bc9027b3dc
Merge pull request #126585 from helsinki-systems/upd/grub2
grub2: 2.06-rc1 -> 2.06
2021-07-15 20:57:04 +02:00
gfrascadorio
7128fc621d grub: latest gnulib requires autoconf 2.64 2021-07-13 10:44:23 -06:00
ajs124
963b0a1dbf grub2: 2.06-rc1 -> 2.06
* GCC 10 support.
* clang 10 support.
* SBAT support.
* LUKS2 support.
* Drop small MBR gap support.
* Xen Security Modules (XSM/FLASK) support.
* The lockdown mechanism similar to the Linux kernel one.
* Disable the os-prober by default.
* Many backports of GRUB distros specific patches.
* BootHole and BootHole2 fixes.
* XFS bigtime support.
* ...and tons of other fixes and cleanups...
2021-06-11 12:56:08 +02:00
Samuel Dionne-Riel
ebe8b87ae7 grub2: Add support for armv7l-linux 2021-05-04 19:37:48 -04:00
Samuel Dionne-Riel
d999e2544b grub2: Add support for hiddenentry
The iso image will use this to allow switching to the text console.
2021-05-01 17:43:00 -04:00
Samuel Dionne-Riel
c89ff38c8b
Merge pull request #119711 from delroth/grub2-cross
grub2_efi: fix cross-compilation
2021-05-01 17:39:41 -04:00
Pierre Bourdon
4df002c432 grub2_efi: fix cross-compilation 2021-05-01 17:01:50 -04:00
Samuel Dionne-Riel
6be41a3545 grub2: Add samueldr as maintainer 2021-04-25 20:07:35 -04:00
Martin Weinelt
97c52d5782
grub: 2.0.4 -> 2.0.6-rc1
Quoting from
https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00007.html:

*******************************************************************************

CVE-2020-14372 grub2: The acpi command allows privileged user to load crafted
               ACPI tables when Secure Boot is enabled
CWE-184
7.5/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

GRUB2 enables the use of the command acpi even when Secure Boot is signaled by
the firmware. An attacker with local root privileges to can drop a small SSDT
in /boot/efi and modify grub.cfg to instruct grub to load said SSDT. The SSDT
then gets run by the kernel and it overwrites the kernel lock down configuration
enabling the attacker to load unsigned kernel modules and kexec unsigned code.

Reported-by: Máté Kukri

*******************************************************************************

CVE-2020-25632 grub2: Use-after-free in rmmod command
CWE-416
7.5/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

The rmmod implementation for GRUB2 is flawed, allowing an attacker to unload
a module used as dependency without checking if any other dependent module is
still loaded. This leads to an use-after-free scenario possibly allowing an
attacker to execute arbitrary code and by-pass Secure Boot protections.

Reported-by: Chris Coulson (Canonical)

*******************************************************************************

CVE-2020-25647 grub2: Out-of-bound write in grub_usb_device_initialize()
CWE-787
6.9/CVSS:3.1/AV:P/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

grub_usb_device_initialize() is called to handle USB device initialization. It
reads out the descriptors it needs from the USB device and uses that data to
fill in some USB data structures. grub_usb_device_initialize() performs very
little bounds checking and simply assumes the USB device provides sane values.
This behavior can trigger memory corruption. If properly exploited, this would
lead to arbitrary code execution allowing the attacker to by-pass Secure Boot
mechanism.

Reported-by: Joseph Tartaro (IOActive) and Ilja van Sprundel (IOActive)

*******************************************************************************

CVE-2020-27749 grub2: Stack buffer overflow in grub_parser_split_cmdline
CWE-121
7.5/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

grub_parser_split_cmdline() expands variable names present in the supplied
command line in to their corresponding variable contents and uses a 1kB stack
buffer for temporary storage without sufficient bounds checking. If the
function is called with a command line that references a variable with a
sufficiently large payload, it is possible to overflow the stack buffer,
corrupt the stack frame and control execution. An attacker may use this to
circumvent Secure Boot protections.

Reported-by: Chris Coulson (Canonical)

*******************************************************************************

CVE-2020-27779 grub2: The cutmem command allows privileged user to remove
               memory regions when Secure Boot is enabled
CWE-285
7.5/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

The GRUB2's cutmem command does not honor Secure Boot locking. This allows an
privileged attacker to remove address ranges from memory creating an
opportunity to circumvent Secure Boot protections after proper triage about
grub's memory layout.

Reported-by: Teddy Reed

*******************************************************************************

CVE-2021-3418 - grub2: GRUB 2.05 reintroduced CVE-2020-15705
CWE-281
6.4/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

The GRUB2 upstream reintroduced the CVE-2020-15705. This refers to a distro
specific flaw which made upstream in the mentioned version.

If certificates that signed GRUB2 are installed into db, GRUB2 can be booted
directly. It will then boot any kernel without signature validation. The booted
kernel will think it was booted in Secure Boot mode and will implement lock
down, yet it could have been tampered.

This flaw only affects upstream and distributions using the shim_lock verifier.

Reported-by: Dimitri John Ledkov (Canonical)

*******************************************************************************

CVE-2021-20225 grub2: Heap out-of-bounds write in short form option parser
CWE-787
7.5/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

The option parser in GRUB2 allows an attacker to write past the end of
a heap-allocated buffer by calling certain commands with a large number
of specific short forms of options.

Reported-by: Daniel Axtens (IBM)

*******************************************************************************

CVE-2021-20233 grub2: Heap out-of-bound write due to mis-calculation of
               space required for quoting
CWE-787
7.5/CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

There's a flaw on GRUB2 menu rendering code setparam_prefix() in the menu
rendering code performs a length calculation on the assumption that expressing
a quoted single quote will require 3 characters, while it actually requires
4 characters. This allow an attacker to corrupt memory by one byte for each
quote in the input.

Reported-by: Daniel Axtens (IBM)
2021-03-23 02:48:30 +01:00
Ryan Burns
41c625ba8f grub2: add passthru.tests 2021-02-17 12:52:20 -08:00
Ryan Burns
7c01f4b8fb grub2: fix cross-compilation
* gettext is used for native binaries, not hosted libs
* grub2 expects `BUILD_CC` to point to a native C compiler
2021-02-17 12:52:18 -08:00
Matthias Devlamynck
b3792f925a grub2: fix grub-kbdcomp
The grub-kbdcomp command was calling ckbcomp directly without patching
to provide its path in the nix store.
2021-02-03 12:41:01 +01:00
mohe2015
d44c6219b8
grub2: Properly disable zfs by default 2021-01-21 18:28:35 +01:00
Ben Siraphob
76f93cc731 pkgs/tools: pkgconfig -> pkg-config 2021-01-16 23:49:59 -08:00
Ben Siraphob
8c5d37129f pkgs/tools: stdenv.lib -> lib 2021-01-15 17:12:36 +07:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Nathan van Doorn
9369f74fb2 grub2: use python3 by default
It should work fine with either 2 or 3 (I'm pretty sure Arch uses 3, for example), and we should be aiming to move away from python 2 wherever possible
2020-08-28 16:09:15 +02:00
Jan Tojnar
e89e2edc73
libusb-compat-0_1: rename from libusb 2020-04-28 05:33:41 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Benno Fünfstück
98bb71f41b grub2: simplify gnulib usage 2020-02-23 19:17:48 +01:00
Vladimír Čunát
f21211ebfe
Merge branch 'master' into staging 2019-09-02 23:25:24 +02:00
Andreas Wiese
8ba94a8fe8 grub2: 2.04-rc1 -> 2.04 (#67622) 2019-09-02 00:47:19 -04:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
volth
c814d72b51 treewide: name -> pname 2019-08-17 10:54:38 +00:00
volth
df4d0fab2f grub: 2.02 -> 2.04-rc1 2019-05-11 13:40:21 -04:00
Vladimír Čunát
61ef8f0b42
grub2: patch to work with updated binutils
This blocked some EFI stuff and consequently the channels.
I would fetchpatch, but their cgit server won't work on this commit.
2019-02-20 11:22:54 +01:00
rnhmjoj
bcf54ce5bb
treewide: use ${stdenv.shell} instead of /bin/sh where possible 2019-01-16 20:37:15 +01:00
Jörg Thalheim
1b146a8c6f
treewide: remove paxutils from stdenv
More then one year ago we removed grsecurity kernels from nixpkgs:
https://github.com/NixOS/nixpkgs/pull/25277

This removes now also paxutils from stdenv.
2018-12-22 12:55:05 +01:00
Markus Kowalewski
aed8699993
grub: add patch for XFS sparse inode feature
xfsprogs-4.16 introduced an new on disk format feature
that is not recognized properly by grub. This patch
allows grub to access XFS filesystem created with
xfsprogs >= 4.16.
This upstream patch can be removed for grub-2.03.
2018-12-10 13:52:55 +01:00
c0bw3b
0498ccd076 Treewide: use HTTPS on GNU domains
HTTP -> HTTPS for :
- http://gnu.org/
- http://www.gnu.org/
- http://elpa.gnu.org/
- http://lists.gnu.org/
- http://gcc.gnu.org/
- http://ftp.gnu.org/ (except in fetchurl mirrors)
- http://bugs.gnu.org/
2018-12-02 15:51:59 +01:00
Benjamin Hipple
4e7c822dc6 grub: fetch from HTTPS instead of FTP; update meta (#48137)
HTTPS is unlikely to be worse and is often better than FTP. Aside from being
faster, there are many networking setups where outgoing FTP traffic is blocked.
2018-10-10 22:25:14 +02:00
Samuel Dionne-Riel
932c8f4c13 grub: grub-0.97-patch-1.15 -> grub-0.97-73
Instead of using Gentoo's patchset, uses Debian's.

Gentoo's doesn't work anymore.
2018-09-17 09:31:36 -04:00
John Ericson
2c2f1e37d4 reewide: Purge all uses stdenv.system and top-level system
It is deprecated and will be removed after 18.09.
2018-08-30 17:20:32 -04:00
Markus Kowalewski
f1c0b5e498
grub-0.97: add license 2018-08-16 22:04:31 +02:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Matthew Bauer
76999cc40e treewide: remove aliases in nixpkgs
This makes the command ‘nix-env -qa -f. --arg config '{skipAliases =
true;}'’ work in Nixpkgs.

Misc...

- qtikz: use libsForQt5.callPackage

  This ensures we get the right poppler.

- rewrites:

  docbook5_xsl -> docbook_xsl_ns
  docbook_xml_xslt -> docbook_xsl

diffpdf: fixup
2018-07-18 23:25:20 -04:00
Symphorien Gibol
3e09239882 grub2: compile grub-mount as well
It is a dependency of os-prober >= 1.75
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860833#23
2018-05-26 20:44:38 +02:00
Will Dietz
855e0463ab tree-wide: platforms = platforms.gnu; -> platforms = gnu ++ linux
"platforms.gnu" has been linux-only since at least 17.03:

$ nix eval -f channel:nixos-17.03 lib.platforms.gnu
[ "i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mips64el-linux" ]

Unlike platforms.linux, platforms.gnu indicates "must use glibc"
which for the most part is not intended.

Replacing platforms.gnu with platforms.linux would be the same "today"
but let's err on preserving existing behavior and be optimistic
about platforms these packages work on.
2018-04-30 18:08:48 -05:00
Will Dietz
e78900213b grub2: extend platforms to include all linux
This works (and is needed) on musl-based linux too!
2018-03-26 15:53:38 -05:00