grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 0/5] fs/iso9660: Fix out-of-bounds read


From: Lidong Chen
Subject: Re: [PATCH v2 0/5] fs/iso9660: Fix out-of-bounds read
Date: Fri, 20 Jan 2023 19:31:08 +0000



On Jan 20, 2023, at 3:49 AM, Thomas Schmitt <scdbackup@gmx.net> wrote:

Hi,

Lidong Chen wrote:
I ran grub-fastest with both ce_loop ISO files. The endless loops were
detected and Grub exited accordingly.

Good.


I didn't know where the grub error message
were stored in case of grub-fastest.

So you don't see an error message ?

No, I don’t see the error message. In this test case, it looks like the calling function
commands/ls.c::grub_ls_list_files() only cares about “GRUB_ERR_BAD_FILE_TYPE”.
So, “GRUB_ERR_BAD_FS” is ignored, thus, no error message.
In general, I looks like grub-fstest.c doesn’t handle grub_errno.



I had the same problem a while ago, when i tried to check that my thoughts
about the loop end condition in grub_iso9660_susp_iterate() are correct.
(This is now covered by your patch 2.)


But, I traced with gdb, and saw the  code reported the error.

It's on my todo list to learn how to prepare grub-fstest for working with
gdb. Currently gdb says "No debugging symbols found in ./grub-fstest”.

I ran make with "-g -O0”,  make -j $(nproc) CFLAGS="-g -O0”



If the diff looks good, I will send the v3 patches set.

I have no objections.

If patches 1 to 4 are included in v3, please tell whether they have changed
towards v2. (I see no reason why they should change. But if they do, i'll
have to compare them with the earlier versions.)

Sure, I will do that. There is no changes to patch 1 to 4, I will mention it in the cover letter.


---------------------------------------------------------------------

I still riddle about how the error message can become visible to the user.
I don't get ideas for that from
 https://urldefense.com/v3/__https://www.gnu.org/software/grub/manual/grub-dev/grub-dev.html*Error-Handling__;Iw!!ACWV5N9M2RV99hQ!JjeG7gWQlfqBsZdUXHliLSgI3HTR5KbRjtS65N8n4eGAomjdhltzK-vqyt7EMz-aEBuFvZWpGZEDQ9PYbtQ$

I read this "If exception is not handled before prompt is displayed, error message will be shown to user.”
Does it imply that the error message is only visible when Grub is running?

Thanks,
Lidong



I wonder what is supposed to happen to the "textual message" component of
a grub_error() call. Under which conditions will it be displayed ?
And where ?


Have a nice day :)

Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]