[PATCH] Add some randomness to TCP source port selection.

2022-06-06 Thread Robert LeBlanc
GRUB uses a static source TCP port and increments for each new connection. When rapidly restarting GRUB this can cause issues with some firewalls that suspect that a reply attack is happening. In addition GRUB does not ACK the last FIN,ACK when booting the kernel and initrd from HTTP for example. T

[PATCH 1/3] grub-mkrescue: Add support for FAT and NTFS on EFI boot

2022-06-06 Thread Pete Batard
In order to add file system transposition support for UEFI, i.e. the ability to copy the content of an ISO9660 grub-mkrescue ISO image onto user-formatted media, and have that boot on UEFI systems, the first thing we need to do is add support for the file systems that are natively handled by UEFI.

[PATCH 2/3] grub-mkrescue: Preserve a copy of the EFI bootloaders on the ISO9660 file system

2022-06-06 Thread Pete Batard
To enable file system transposition support for UEFI, we also must ensure that there exists a copy of the EFI bootloaders, that are currently embedded in the efi.img for xorriso, at their expected UEFI location on the ISO9660 file system. This is accomplished by removing the use of a temporary dir

[PATCH 3/3] grub-mkrescue: Search by file UUID file rather than partition UUID for EFI boot

2022-06-06 Thread Pete Batard
The final piece we need to add file system transposition support for UEFI is to ensure that we can locate the boot media regardless of how the boot partition was instantiated. Especially, we do not want to be reliant on brittle partition UUIDs, as these only work if a boot media is duplicated at th

[PATCH 0/3] Add support for EFI file system transposition

2022-06-06 Thread Pete Batard
Hello everyone, This series of patches adds file system transposition support, for UEFI boot media created with grub-mkrescue. File system transposition means the ability to take the content of a UEFI bootable media and copy it, at the file system level, to a partition that was independently c

Re: [PATCH v3 1/2] json: Add function to unescape JSON-encoded strings

2022-06-06 Thread Glenn Washburn
On Mon, 6 Jun 2022 07:18:28 +0200 Patrick Steinhardt wrote: > On Sun, Jun 05, 2022 at 02:00:44PM -0500, Glenn Washburn wrote: > > On Mon, 30 May 2022 18:01:01 +0200 > > Patrick Steinhardt wrote: > > > > > JSON strings require certain characters to be encoded, either by using a > > > single reve

Re: [PATCH v2 3/3] grub-core/kern/disk.c: handle LUKS2 devices

2022-06-06 Thread Glenn Washburn
On Mon, 6 Jun 2022 07:32:40 +0200 Patrick Steinhardt wrote: > On Sun, Jun 05, 2022 at 01:43:18PM -0500, Glenn Washburn wrote: > > On Sun, 29 May 2022 09:09:38 +0200 > > Patrick Steinhardt wrote: > > > > > On Tue, May 10, 2022 at 10:55:52PM -0500, Glenn Washburn wrote: > > > > On Mon, 09 May 202

Re: [PATCH v4 1/2] json: Add function to unescape JSON-encoded strings

2022-06-06 Thread Glenn Washburn
On Mon, 6 Jun 2022 07:28:56 +0200 Patrick Steinhardt wrote: > JSON strings require certain characters to be encoded, either by using a > single reverse solidus character "\" for a set of popular characters, or > by using a Unicode representation of "\uX". The jsmn library doesn't > handle une

Re: [PATCH v4 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-06-06 Thread Glenn Washburn
On Mon, 6 Jun 2022 07:29:00 +0200 Patrick Steinhardt wrote: > It was reported in the #grub IRC channel on Libera that decryption of > LUKS2 partitions fails with errors about invalid digests and/or salts. > In all of these cases, what failed was decoding the Base64 > representation of these, wher

Re: [PATCH] Add some randomness to TCP source port selection.

2022-06-06 Thread Vladimir 'phcoder' Serbinenko
256 is a bad modulo. A prime would be a much better one for those purposes. Also get_time_ms counts up from arbitrary point in time, often boot. I suggest using some combination of etc and get_time to seed an LFSR algorithm Le lun. 6 juin 2022, 18:37, Robert LeBlanc a écrit : > GRUB uses a stati

Re: [PATCH] Add some randomness to TCP source port selection.

2022-06-06 Thread Vladimir 'phcoder' Serbinenko
Le lun. 6 juin 2022, 19:25, Vladimir 'phcoder' Serbinenko a écrit : > 256 is a bad modulo. A prime would be a much better one for those > purposes. Also get_time_ms counts up from arbitrary point in time, often > boot. I suggest using some combination of etc > RTC, not etc > > and get_time to s

Re: GRUB coverity fixes for CIDs 314020 and 314023

2022-06-06 Thread Daniel Kiper
On Fri, Jun 03, 2022 at 02:12:00PM +0100, Darren Kenny wrote: > On Thursday, 2022-06-02 at 15:18:25 UTC, Jagannathan Raman wrote: > > Hi, > > > > This series addresses a couple of untrusted loop bounds flagged by > > Coverity in "grub-core/fs/zfs". Both the bugs addressed in this series > > are of

Re: [PATCH v4] efidisk: pass buffers with higher alignment

2022-06-06 Thread Daniel Kiper
On Tue, May 31, 2022 at 06:10:42PM +0200, Heinrich Schuchardt wrote: > On 5/31/22 17:53, Stefan Agner wrote: > > Some devices report IoAlign values but seem to require buffers with > > higher alignment. > > > > The UEFI specification is saying: "IoAlign values of 0 and 1 mean that > > the buffer ca