Linux filesystem development
 help / color / mirror / Atom feed
From: Matthias Goergens <matthias.goergens@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Thomas Schmitt <scdbackup@gmx.net>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] isofs: Always advance to the next block in readdir and lookup
Date: Thu, 24 Sep 2026 01:52:08 +0800	[thread overview]
Message-ID: <20260923175208.1576995-1-matthias.goergens@gmail.com> (raw)
In-Reply-To: <vjb4g4xyuare7b6w6lwtbuijboeqhrzdo4vboi7fgpyeu4prtx@gv2zvtsbae6u>

On Wed 23-09-26 18:55:11, Jan Kara wrote:
> So I agree what you do is easier to understand so I'll fold it into the
> previous commit. Just I'm not sure it is a realistic failure case - that
> would mean a directory would contain full block of zeros which I don't
> think can happen. Plus this infinite loop was there forever AFAICS and
> nobody complained...

Thanks for folding it in.

Maybe I'm missing something, but I thought the loop came in with
3c01d9263683.  Before it, both walkers advanced with
(pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1), which moves on even
when pos is already aligned, and mainline lists the reproducer images
fine; only for_next spins on them.  Is there an older path that loops
that I haven't found?

Agreed that a well-formed image with 2048-byte blocks won't have such a
block.  But only the first byte of the directory block has to be zero,
since the walk doesn't look past it: a crafted image needs one byte, and
faulty hardware or an incomplete copy that returns a zeroed sector does
it too.  The task then can't be killed.

Matthias

  reply	other threads:[~2026-09-23 17:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 12:19 [PATCH] isofs: Fix handling of directories with tight blocks Jan Kara
2026-09-22 14:59 ` Thomas Schmitt
2026-09-23 10:22   ` Jan Kara
2026-09-23 15:31 ` [PATCH] isofs: Always advance to the next block in readdir and lookup Matthias Goergens
2026-09-23 16:55   ` Jan Kara
2026-09-23 17:52     ` Matthias Goergens [this message]
2026-09-23 18:40       ` Jan Kara
2026-09-25  4:28     ` Matthias Goergens
2026-09-25  2:34 ` [syzbot ci] Re: isofs: Fix handling of directories with tight blocks syzbot ci

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=20260923175208.1576995-1-matthias.goergens@gmail.com \
    --to=matthias.goergens@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=scdbackup@gmx.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox