* [PATCH] ntfs: Fix attribute validation check
@ 2025-05-03 8:02 Vladimir Serbinenko
2025-05-05 15:22 ` Glenn Washburn
2025-05-15 16:24 ` Daniel Kiper
0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Serbinenko @ 2025-05-03 8:02 UTC (permalink / raw)
To: grub-devel; +Cc: Vladimir Serbinenko
Without this fix GRUB doesn't see most of the files
on NTFS partition.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
grub-core/fs/ntfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
index b3117bf92..393a763ee 100644
--- a/grub-core/fs/ntfs.c
+++ b/grub-core/fs/ntfs.c
@@ -175,7 +175,7 @@ validate_attribute (grub_uint8_t *attr, void *end)
* the minimum size.
*/
min_size += (attr[curr] & 0x7) + ((attr[curr] >> 4) & 0x7);
- curr += min_size;
+ curr = min_size;
min_size++;
if (min_size > attr_size)
goto fail;
--
2.49.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ntfs: Fix attribute validation check
2025-05-03 8:02 [PATCH] ntfs: Fix attribute validation check Vladimir Serbinenko
@ 2025-05-05 15:22 ` Glenn Washburn
2025-05-05 15:27 ` Andrew Hamilton
2025-05-15 16:24 ` Daniel Kiper
1 sibling, 1 reply; 5+ messages in thread
From: Glenn Washburn @ 2025-05-05 15:22 UTC (permalink / raw)
To: Vladimir Serbinenko
Cc: The development of GNU GRUB, Daniel Kiper, Andrew Hamilton
On Sat, 3 May 2025 08:02:07 +0000
Vladimir Serbinenko <phcoder@gmail.com> wrote:
> Without this fix GRUB doesn't see most of the files
> on NTFS partition.
I can confirm that this fixes the testing issue I mentioned in another
thread. The ntfs filesystem tests now fail with HARDLINK FAIL, but I
presume that's a separate issue.
Tested-by: Glenn Washburn <development@efficientek.com>
Glenn
>
> Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
> ---
> grub-core/fs/ntfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
> index b3117bf92..393a763ee 100644
> --- a/grub-core/fs/ntfs.c
> +++ b/grub-core/fs/ntfs.c
> @@ -175,7 +175,7 @@ validate_attribute (grub_uint8_t *attr, void *end)
> * the minimum size.
> */
> min_size += (attr[curr] & 0x7) + ((attr[curr] >> 4) & 0x7);
> - curr += min_size;
> + curr = min_size;
> min_size++;
> if (min_size > attr_size)
> goto fail;
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ntfs: Fix attribute validation check
2025-05-05 15:22 ` Glenn Washburn
@ 2025-05-05 15:27 ` Andrew Hamilton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Hamilton @ 2025-05-05 15:27 UTC (permalink / raw)
To: development
Cc: Vladimir Serbinenko, The development of GNU GRUB, Daniel Kiper
[-- Attachment #1.1: Type: text/plain, Size: 1534 bytes --]
Yes this matches with the first layer of the onion I also found.
The hard link fail issue seems to stem from attempting to use
validate_attribute on attribute lists instead of attributes, I’m working on
a fix for that but it’s taking some time as it creates new fuzzer
identified flaws once changed.
Thanks
Andrew
On Mon, May 5, 2025 at 10:22 AM Glenn Washburn <development@efficientek.com>
wrote:
> On Sat, 3 May 2025 08:02:07 +0000
> Vladimir Serbinenko <phcoder@gmail.com> wrote:
>
> > Without this fix GRUB doesn't see most of the files
> > on NTFS partition.
>
> I can confirm that this fixes the testing issue I mentioned in another
> thread. The ntfs filesystem tests now fail with HARDLINK FAIL, but I
> presume that's a separate issue.
>
> Tested-by: Glenn Washburn <development@efficientek.com>
>
> Glenn
>
> >
> > Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
> > ---
> > grub-core/fs/ntfs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
> > index b3117bf92..393a763ee 100644
> > --- a/grub-core/fs/ntfs.c
> > +++ b/grub-core/fs/ntfs.c
> > @@ -175,7 +175,7 @@ validate_attribute (grub_uint8_t *attr, void *end)
> > * the minimum size.
> > */
> > min_size += (attr[curr] & 0x7) + ((attr[curr] >> 4) & 0x7);
> > - curr += min_size;
> > + curr = min_size;
> > min_size++;
> > if (min_size > attr_size)
> > goto fail;
>
[-- Attachment #1.2: Type: text/html, Size: 2329 bytes --]
[-- Attachment #2: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ntfs: Fix attribute validation check
2025-05-03 8:02 [PATCH] ntfs: Fix attribute validation check Vladimir Serbinenko
2025-05-05 15:22 ` Glenn Washburn
@ 2025-05-15 16:24 ` Daniel Kiper
2025-05-17 1:28 ` Andrew Hamilton
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Kiper @ 2025-05-15 16:24 UTC (permalink / raw)
To: Vladimir Serbinenko; +Cc: grub-devel
On Sat, May 03, 2025 at 08:02:07AM +0000, Vladimir Serbinenko wrote:
> Without this fix GRUB doesn't see most of the files
> on NTFS partition.
It would be perfect if it is explained why current code is broken and
why the fix is correct...
Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ntfs: Fix attribute validation check
2025-05-15 16:24 ` Daniel Kiper
@ 2025-05-17 1:28 ` Andrew Hamilton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Hamilton @ 2025-05-17 1:28 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: Vladimir Serbinenko
[-- Attachment #1.1: Type: text/plain, Size: 742 bytes --]
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 <dkiper@net-space.pl> wrote:
> On Sat, May 03, 2025 at 08:02:07AM +0000, Vladimir Serbinenko wrote:
> > Without this fix GRUB doesn't see most of the files
> > on NTFS partition.
>
> It would be perfect if it is explained why current code is broken and
> why the fix is correct...
>
> Daniel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #1.2: Type: text/html, Size: 1300 bytes --]
[-- Attachment #2: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-17 1:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-03 8:02 [PATCH] ntfs: Fix attribute validation check Vladimir Serbinenko
2025-05-05 15:22 ` Glenn Washburn
2025-05-05 15:27 ` Andrew Hamilton
2025-05-15 16:24 ` Daniel Kiper
2025-05-17 1:28 ` Andrew Hamilton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.