grub-devel
[Top][All Lists]
Advanced

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

Re: Possible memory fault in fs/iso9660 (correction)


From: Thomas Schmitt
Subject: Re: Possible memory fault in fs/iso9660 (correction)
Date: Tue, 29 Nov 2022 20:12:00 +0100

Hi,

i wrote:
> > > I will think about creating such an ISO by help of xorriso and dd.

Daniel Kiper wrote:
> Yeah, that would be perfect...

I believe to have created one. But grub-fstest does not produce a memory
fault. See my mail
  Date: Tue, 29 Nov 2022 19:47:22 +0100
  Message-Id: <50363882005823433@scdbackup.webframe.org>
for the recipe to create that ISO.

I riddle:

- Would valgrind detect out-of-bounds reading in GRUB code ?
  (Or does the code under grub-fstest allocate a large memory chunk on
   which the memory management of GRUB operates ?)

- Is there a way to build the involved code for use under gdb ?

- How can i insert debug messages into grub-core/fs/iso9660.c ?


> > > [more opportunities to let the code derail]

> Huh! Could you fix these issues too?

I will try. But first i need to master grub-fstest or some other testbed
so that i can verify my theoretical considerations.

(The "- 1" problem is obvious from C code considerations. But the number
 to replace the "1" is not so obvious and in general we should not fix
 what is not broken.)


> > > In general:
> > > How mistrusting should GRUB be towards the bytes in the filesystem ?

> I think as little as possible. Especially if incorrect values may lead
> to OOB writes...

It is about out-of-bounds reads.

But i don't understand well the combination of your two sentences:
GRUB shall be credulent, especially if bad writes were involved ?
I would think that this is to be avoided most.

So please explain the philosopy a bit more verbous for an old programmer
or point me to examples.
(I would look into the other fs drivers if i would understand filesystems
 other than ISO 9660.)


Have a nice day :)

Thomas




reply via email to

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