From: Andreas Klauer <andreas.klauer@metamorpher.de>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: B Horn <b@horn.uk>, Andreas Klauer <andreas.klauer@metamorpher.de>
Subject: Re: [PATCH] fs/ntfs: Check at->attr_cur after calling next_attribute()
Date: Fri, 28 Feb 2025 21:58:33 +0100 [thread overview]
Message-ID: <Z8IjefifS-dpHr-4@memoxo.de> (raw)
In-Reply-To: <20250228130739.84606-2-b@horn.uk>
On Fri, Feb 28, 2025 at 01:07:06PM +0000, B Horn wrote:
> On some NTFS volumes GRUB would enter an infinite loop when
> next_attribute() returned NULL, which can happen in normal cases when
> the end of the attribute list is reached.
> This would trigger a NULL deref, but as the null page is mapped on the
> majority of firmware, an infinite loop would occur as the while loop
> didn't make any progress.
>
> Fixing this by verifying the value of at->attr_cur on the next iteration
> of the loop, after it has been set to the result of next_attribute().
> Also removing the redundant check against mft_end as the
> next_attribute() should handle that now.
> A pointer to the end of the buffer is stored in at->end, which is
> initialized the same way as mft_end was.
>
> Fixes: https://savannah.gnu.org/bugs/index.php?66855
>
> Reported-by: Andreas Klauer <andreas.klauer@metamorpher.de>
> Signed-off-by: B Horn <b@horn.uk>
Thank you, it works fine here.
Regards
Andreas
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2025-02-28 20:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 13:07 [PATCH] fs/ntfs: Check at->attr_cur after calling next_attribute() B Horn
2025-02-28 20:58 ` Andreas Klauer [this message]
2025-02-28 22:17 ` Vladimir 'phcoder' Serbinenko
2025-03-01 1:09 ` B Horn
2025-03-10 12:19 ` Marta Lewandowska
2025-03-17 12:47 ` Andrew Hamilton
2025-03-18 14:22 ` Andrew Hamilton
2025-03-20 16:45 ` Daniel Kiper
2025-03-20 16:54 ` Andrew Hamilton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z8IjefifS-dpHr-4@memoxo.de \
--to=andreas.klauer@metamorpher.de \
--cc=b@horn.uk \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.