[PATCH v2 4/4] fs/ntfs: Correct possible access violations and hangs

2025-05-19 Thread Andrew Hamilton
Correct several memory access violations and hangs found during fuzzing. The issues fixed here could occur if certain specific malformed NTFS file systems were presented to GRUB. Currently, GRUB does not allow NTFS file system access when lockdown mode is enforced, so these should be of minimal imp

[PATCH v2 2/4] fs/ntfs: Correct attribute vs attribute list validation

2025-05-19 Thread Andrew Hamilton
Correct ntfs_test test failures around attempting to validate attribute list entries as attributes. The NTFS code uses common logic in some places to parse both attributes and attribute_lists which complicates validation. Attribute lists contain different headers including a different size of the l

[PATCH v2 3/4] fs/fshelp: Avoid possible NULL pointer deference

2025-05-19 Thread Andrew Hamilton
Avoid attempting to defererence a NULL pointer to call read_symlink when the given filesystem does not provide a read_symlink function. This could be triggered if the calling filesystem had a file marked as a symlink. This appears possible for HFS and was observed during fuzzing of NTFS. Signed-of

[PATCH v2 1/4] fs/ntfs: Correct regression with run list calculation

2025-05-19 Thread Andrew Hamilton
Correct ntfs_test test failures around attempting to validate attribute run list values. The calculation was incorrect for the 'curr' variable. With previous calculation, some file systems would fail validation despite being well-formed and valid. This was caused by incrementing 'curr' by min_size

[PATCH v2 0/4] fs: Test failure fixes and fuzzer fixes

2025-05-19 Thread Andrew Hamilton
Correct some NTFS test failures introduced by previous fixes for CVEs. With these changes, the NTFS tests run successfully. Also correct some fuzzer identified crashes and hangs (in NTFS and one that may in theory impact HFS too). Changes since v1: - Daniel Kiper review comments addressed: -

Re: [PATCH v1 1/2] envblk: ignore empty new lines while parsing env files

2025-05-19 Thread Alexey Makhalov via Grub-devel
On 5/19/25 10:13 AM, Daniel Kiper wrote: On Sun, May 18, 2025 at 01:21:20PM +0530, Shreenidhi Shedi wrote: From: Shreenidhi Shedi Environment files may contain empty lines, which should be ignored during parsing. Currently, these lines are not skipped and resulting in incorrect behavior. Thi

[PATCH v2 2/2] cmdline: fix command line parsing in grub

2025-05-19 Thread Shreenidhi Shedi
From: Shreenidhi Shedi Previously, the command line construction function (grub_create_loader_cmdline) escaped single and double quotes, which is unnecessary and potentially problematic since the kernel command line handler does not support escaped quotes. This patch removes the escaping of these

[PATCH v2 0/2] Fix cfg file parsing and command line parsing

2025-05-19 Thread Shreenidhi Shedi
Hi GRUB Developers, This patch series contains two fixes to improve how GRUB handles environment files and constructs the kernel command line, these issues were reported by PhotonOS customers. The first patch ensures that empty lines in environment files are skipped during parsing. The second pa

[PATCH v2 1/2] envblk: ignore empty new lines while parsing env files

2025-05-19 Thread Shreenidhi Shedi
From: Shreenidhi Shedi Environment files may contain empty lines, which should be ignored during parsing. Currently, these lines are not skipped and resulting in incorrect behavior. This patch adds a check to skip empty lines along with those starting with `#'. Signed-off-by: Shreenidhi Shedi R

Re: [PATCH v1 1/2] envblk: ignore empty new lines while parsing env files

2025-05-19 Thread Shreenidhi Shedi
On 19/05/25 22:43, Daniel Kiper wrote: On Sun, May 18, 2025 at 01:21:20PM +0530, Shreenidhi Shedi wrote: From: Shreenidhi Shedi Environment files may contain empty lines, which should be ignored during parsing. Currently, these lines are not skipped and resulting in incorrect behavior. This pa

Re: [PATCH v1 1/2] envblk: ignore empty new lines while parsing env files

2025-05-19 Thread Vladimir 'phcoder' Serbinenko
Are those empty lines result of manual editing of envblk? You should not do this Regards Le dim. 18 mai 2025, 11:01, Shreenidhi Shedi a écrit : > From: Shreenidhi Shedi > > Environment files may contain empty lines, which should be > ignored during parsing. Currently, these lines are not skipp

Re: [PATCH v1 1/2] envblk: ignore empty new lines while parsing env files

2025-05-19 Thread Daniel Kiper
On Sun, May 18, 2025 at 01:21:20PM +0530, Shreenidhi Shedi wrote: > From: Shreenidhi Shedi > > Environment files may contain empty lines, which should be > ignored during parsing. Currently, these lines are not skipped and > resulting in incorrect behavior. This patch adds a check to skip empty >

Re: [RESEND PATCH 3/3] commands/efi/tmp: Fix memory leak

2025-05-19 Thread Daniel Kiper
On Fri, May 16, 2025 at 07:19:36PM +, khaalid cali wrote: > From: khaalid > > Free handles probably before return. > > Signed-off-by: Khalid Ali Could you merge this patch with "commands/efi/lsefi: Fix memory leak" one? Did you check other grub_efi_locate_handle() calls? Daniel __

Re: [PATCH 1/3] fs/ntfs: Correct some NTFS regressions

2025-05-19 Thread Andrew Hamilton
Thanks I will make the suggested fixes and sent out a v2 later. - Andrew On Mon, May 19, 2025 at 11:56 AM Daniel Kiper wrote: > On Fri, May 16, 2025 at 08:26:44PM -0500, Andrew Hamilton wrote: > > 1. Correct ntfs_test test failures around attempting to validate > attribute list entries as attri

Re: [PATCH 2/3] fs/fshelp: Avoid possible NULL pointer deference

2025-05-19 Thread Andrew Hamilton
Thanks I will make the suggested fixes and sent out a v2 later. - Andrew On Sat, May 17, 2025 at 6:23 AM Vladimir 'phcoder' Serbinenko < phco...@gmail.com> wrote: > Another comment: ERR_BAD_FS might be a better fit given how it can be > triggered. > > Regards > > Le sam. 17 mai 2025, 14:09, Vla

Re: [PATCH v2 0/3] commands/efi/lsefi: Fix memory leak

2025-05-19 Thread Daniel Kiper
On Fri, May 16, 2025 at 07:08:24PM +, khaalid cali wrote: > From: khaalid Please drop this line. It is not needed... Additionally, may I ask you to send patches using "git send-email" command? > "handles" that "grub_efi_locate_handles" was allocated with "grub_malloc" > wasn't being freed.

Re: [PATCH 1/3] fs/ntfs: Correct some NTFS regressions

2025-05-19 Thread Daniel Kiper
On Fri, May 16, 2025 at 08:26:44PM -0500, Andrew Hamilton wrote: > 1. Correct ntfs_test test failures around attempting to validate attribute > list entries as attributes. The NTFS code uses common logic in some places to > parse both attributes and attribute_lists which complicates validation. >

[PATCH v2] ieee1275: support added for multiple nvme bootpaths

2025-05-19 Thread Avnish Chouhan
This patch sets mupltiple NVMe boot-devices for more robust boot. Scenario where NVMe multipaths are available, all the available bootpaths (Max 5) will be added as the boot-device. Signed-off-by: Avnish Chouhan --- grub-core/osdep/unix/platform.c | 114