All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: lidong.chen@oracle.com, fengtao40@huawei.com, yanan@huawei.com,
	daniel.kiper@oracle.com, lichenca2005@gmail.com
Subject: Re: Proposal v2: fs/iso9660: Prevent skipping CE or ST at start of continuation area
Date: Thu, 12 Jan 2023 09:45:21 +0100	[thread overview]
Message-ID: <11335387638173384608@scdbackup.webframe.org> (raw)
In-Reply-To: <87CFA906-7363-4690-BC1B-9771F32EACE6@ORACLE.COM>

Hi,

Lidong Chen wrote:
> To test it, I am thinking to add the ISO entry in 40_custom script, then select
> the ISO from Grub menu. Is it the right way to test it? Or, is there a better way
> to it?

I have to leave the answer to the experienced GRUB developers.

Testing is my weak spot with GRUB. About 6 weeks ago i tried to demonstrate
a risk for memory fault and grub-fstest simply did not want to fail.

This reminds me that i should have tested my ISOs with grub-fstest before
posting them. To my luck the program as pulled 6 weeks ago behaves like i
predicted:

  $ ./grub-fstest ce_loop.iso ls /
  x
  $ ./grub-fstest ce_loop2.iso ls /
  ^C
  $

I waited about half a minute (on a 4 GHz Xeon) for the second run to end.
Then i aborted it by Ctrl+C.
As i am at it, i tried with Linux kernel "5.10.0-13-amd64 #1 SMP Debian
5.10.106-1 (2022-03-17)":

  # mount ce_loop.iso /mnt/iso
  mount: /mnt/iso: WARNING: source write-protected, mounted read-only.
  # ls -l /mnt/iso
  total 0
  #

No file /x but also no special messages in dmesg. Only:
  [ ...] loop: module loaded
  [ ...] ISO 9660 Extensions: RRIP_1991A

Same behavior with the ISO which drives grub-fstest into the endless loop:

  # umount /mnt/iso
  # mount ce_loop2.iso /mnt/iso
  mount: /mnt/iso: WARNING: source write-protected, mounted read-only.
  # ls -l /mnt/iso
  total 0
  #

So Linux seems to be safe against this hack.
(I will have a look into the source in order to learn how this situation
gets handled.)


> Thanks a lot for the detail instruction! It is very helpful for the test as
> well as for my learning.

That's the topic where i can be of use.
Don't hesitate to ask for explanations, pointers to the specs, or nastily
manipulated ISOs.


Have a nice day :)

Thomas



  reply	other threads:[~2023-01-12  8:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 18:55 [PATCH 0/4] fs/iso9660: Fix out-of-bounds read Lidong Chen
2022-12-14 18:55 ` [PATCH 1/4] fs/iso9660: Add check to prevent infinite loop Lidong Chen
2022-12-15 17:52   ` Thomas Schmitt
2022-12-19  8:16     ` Lidong Chen
2022-12-19  9:42       ` Thomas Schmitt
2022-12-14 18:55 ` [PATCH 2/4] fs/iso9660: Prevent read past the end of system use area Lidong Chen
2022-12-15 18:00   ` Thomas Schmitt
2022-12-19  8:39     ` Lidong Chen
2022-12-16  8:54   ` Thomas Schmitt
2022-12-16  9:42   ` Proposal: fs/iso9660: Prevent skipping CE or ST at start of continuation area Thomas Schmitt
2022-12-16 12:57     ` Proposal v2: " Thomas Schmitt
2022-12-20 21:08       ` Lidong Chen
2023-01-06  5:30       ` Lidong Chen
2023-01-06 16:00         ` Thomas Schmitt
2023-01-09  7:34           ` Lidong Chen
2023-01-09  9:32             ` Thomas Schmitt
2023-01-11 11:54               ` Thomas Schmitt
2023-01-12  5:28                 ` Lidong Chen
2023-01-12  8:45                   ` Thomas Schmitt [this message]
2022-12-14 18:55 ` [PATCH 3/4] fs/iso9660: Avoid reading past the entry boundary Lidong Chen
2022-12-15 18:08   ` Thomas Schmitt
2022-12-19  8:42     ` Lidong Chen
2022-12-14 18:55 ` [PATCH 4/4] fs/iso9660: Incorrect check for entry boudary Lidong Chen
2022-12-15 18:20   ` Thomas Schmitt
2022-12-19 21:00     ` Lidong Chen
2022-12-20  9:21       ` Thomas Schmitt
2022-12-14 21:42 ` [PATCH 0/4] fs/iso9660: Fix out-of-bounds read Thomas Schmitt
2022-12-19  8:07   ` Lidong Chen

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=11335387638173384608@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=daniel.kiper@oracle.com \
    --cc=fengtao40@huawei.com \
    --cc=grub-devel@gnu.org \
    --cc=lichenca2005@gmail.com \
    --cc=lidong.chen@oracle.com \
    --cc=yanan@huawei.com \
    /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.