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

2022-05-30 Thread Patrick Steinhardt
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, where the encoded data contained invalid characters. As it turns out, the

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

2022-05-30 Thread Patrick Steinhardt
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 unescaping for us, so we must implement this functionality for ourselves.

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

2022-05-30 Thread Patrick Steinhardt
Hi, this is the third version of my patch series which fixes decoding of digests and salts in LUKS2 headers in case they happen to contain escaped characters. While modern cryptsetup versions in fact don't escape any characters part of the Base64 alphabet, old versions of cryptsetup did this until

Re: [RFC PATCH v3 5/5] Cleanup: grub-mkconfig_lib: remove unused version comparison functions

2022-05-30 Thread Mathieu Desnoyers
- On May 27, 2022, at 10:56 AM, Robbie Harwood rharw...@redhat.com wrote: > Michael Chang via Grub-devel writes: > >> On Thu, May 26, 2022 at 05:07:11PM -0400, Robbie Harwood wrote: >>> Mathieu Desnoyers writes: >>> There are no users left of version_find_latest(), version_test_gt(),

Re: [PATCH 0/6] Fix coverity bugs and add checks for elf values in grub-core

2022-05-30 Thread Darren Kenny
Hi Alec, All of these look great, so: Reviewed-by: Darren Kenny Thanks for looking at the Coverity issues, Darren. On Thursday, 2022-05-26 at 15:29:46 -04, Alec Brown wrote: > Coverity identified several untrusted loop bounds and untrusted allocation > size > bugs in grub-core/loader/i386/bs