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

2025-05-16 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-

Re: [PATCH] ntfs: Fix attribute validation check

2025-05-16 Thread Andrew Hamilton
I just sent a patch series that happens to attempt to address the same issue being addressed here, but in a slightly different way. It should have title: [PATCH 1/3] fs/ntfs: Correct some NTFS regressions Thanks, Andrew On Thu, May 15, 2025 at 11:25 AM Daniel Kiper wrote: > On Sat, May 03, 202

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

2025-05-16 Thread Andrew Hamilton
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. 2. Correct ntfs_test test failures around attempting to validate attribu

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

2025-05-16 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). Signed-off-by: Andrew Hamilton Andrew Hamilton (3): fs/ntfs:

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

2025-05-16 Thread Andrew Hamilton
Correct several memory access violations and hangs found during fuzzing. Signed-off-by: Andrew Hamilton --- grub-core/fs/ntfs.c | 95 ++--- 1 file changed, 80 insertions(+), 15 deletions(-) diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c index 0d08

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

2025-05-16 Thread khaalid cali
From: khaalid Free handles probably before return. Signed-off-by: Khalid Ali --- grub-core/commands/efi/tpm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c index cbac69866..cb39b7bba 100644 --- a/grub-core/commands/efi/tpm.c +

[PATCH v2 2/3] loader/efi/linux: Fix memory leak

2025-05-16 Thread khaalid cali
From: khaalid Free "mempath" in case of failures. Signed-off-by: Khalid Ali --- grub-core/loader/efi/linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 7c7db3e3a..507d3a343 100644 --- a/grub-core/l

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

2025-05-16 Thread khaalid cali
From: khaalid "handles" that "grub_efi_locate_handles" was allocated with "grub_malloc" wasn't being freed. Signed-off-by: Khalid Ali --- grub-core/commands/efi/lsefi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/

Re: [PATCH 1/2] loader/efi/linux: Fix memory leak

2025-05-16 Thread Daniel Kiper
The patch set is missing cover letter. On Tue, May 13, 2025 at 11:03:25AM +, khaalid cali wrote: > From: khaalid Again, you can drop this from all patches. > It was forgotten to free mempath entirely. > > Signed-off-by: Khalid Ali > --- > grub-core/loader/efi/linux.c | 9 - > 1 fi

Re: [PATCH 2/2] disk/efi/efidisk: Fix memory leak

2025-05-16 Thread Daniel Kiper
On Tue, May 13, 2025 at 11:04:31AM +, khaalid cali wrote: > From: khaalid > > On two places if `grub_efi_find_last_device_path` fails, then `dp` is > leaked. > > Signed-off-by: Khalid Ali > --- > grub-core/disk/efi/efidisk.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/grub

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

2025-05-16 Thread Daniel Kiper
On Tue, May 13, 2025 at 11:01:36AM +, khaalid cali wrote: > From: khaalid You can drop this if it is your patch. > It was forgotten to free `handles` array of handles returned by Please use " instead of ` and/or '. > `grub_efi_locate_handle`. This is quite a large amount of memory, it depe

Re: [PATCH v3 0/1] loader/efi/chainloader: Enhance error message of chainloader command

2025-05-16 Thread Daniel Kiper
On Mon, May 12, 2025 at 07:15:08PM +, khaalid cali wrote: > From: khaalid > > Well, i think the hex option is simpler in terms of code. Or maybe we > need to have centralized function for all UEFI error messages, however > this will complicate things a little bit as it requires modifications.

[RFC] Add xHCI support

2025-05-16 Thread Waldemar Brodkorb
Add support for xHCI USB controllers. The code is based on seabios implementation, but has been heavily modified to match grubs internals. A version of this patch was suggested to Qemu developers in 12/2020. Since then it was modified by Eltan to work on more hardware. Afterwards my colleague Deiv