mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: "contact@gvernon.com" <contact@gvernon.com>,
	"penguin-kernel@I-love.SAKURA.ne.jp"
	<penguin-kernel@I-love.SAKURA.ne.jp>
Cc: "glaubitz@physik.fu-berlin.de" <glaubitz@physik.fu-berlin.de>,
	"frank.li@vivo.com" <frank.li@vivo.com>,
	"syzbot+97e301b4b82ae803d21b@syzkaller.appspotmail.com"
	<syzbot+97e301b4b82ae803d21b@syzkaller.appspotmail.com>,
	"slava@dubeyko.com" <slava@dubeyko.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v7] hfs: validate record ID against requested CNID in hfs_cat_find_brec()
Date: Tue, 19 May 2026 21:09:56 +0000	[thread overview]
Message-ID: <056cb181540c72110b973fcaa0e1b11552623649.camel@ibm.com> (raw)
In-Reply-To: <7c54e697-9a96-4304-826e-8a437218f5e4@I-love.SAKURA.ne.jp>

On Sat, 2026-05-16 at 15:17 +0900, Tetsuo Handa wrote:
> On 2026/05/16 6:10, Viacheslav Dubeyko wrote:
> > On Thu, 2026-05-14 at 16:34 +0900, Tetsuo Handa wrote:
> > > syzbot is reporting that BUG() in hfs_write_inode() fires upon unmount
> > > operation when the inode number of the record retrieved as a result of
> > > hfs_cat_find_brec(HFS_ROOT_CNID) is not HFS_ROOT_CNID, for
> > > commit b905bafdea21 ("hfs: Sanity check the root record") checked
> > > the record size and the record type but did not check the inode number.
> > > 
> > > Initially, Viacheslav Dubeyko was assuming that we can fix this problem
> > > by adding validation to hfs_read_inode(), and George Anthony Vernon is
> > > proposing a patch that adds validation to hfs_read_inode().
> > > 
> > 
> > We can fix the problem in by adding validation to hfs_read_inode().
> 
> No, we can't. We can't fix a logical error that hfs_fill_super() by error
> accepts an inode which is not the root inode, by adding validation to
> hfs_read_inode().
> 

We can. And I explained the way.

> > 
> > > While I am not against adding validation to hfs_read_inode(), treating
> > > an inode which is not the root inode as if the root inode is a logical
> > > error which should be rejected regardless of whether we hit BUG() or not.
> > > And we confirmed that we can't fix this logical error by adding validation
> > > to hfs_read_inode().
> > > 
> > 
> > We haven't confirmed it. The issue can be fixed by adding validation to
> > hfs_read_inode().
> 
> We already confirmed it, you forgot it.
> https://lkml.kernel.org/r/b7318588-33b2-4dc6-9469-e11da855f8ad@I-love.SAKURA.ne.jp
> 

No. we haven't confirmed it. We can do it.

Thanks,
Slava.


  reply	other threads:[~2026-05-19 21:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 21:13 [PATCH v4] hfs: Validate CNIDs in hfs_read_inode George Anthony Vernon
2026-03-12 10:45 ` Tetsuo Handa
2026-03-12 23:13   ` Viacheslav Dubeyko
2026-03-13 11:03     ` Tetsuo Handa
2026-03-13 18:40       ` Viacheslav Dubeyko
2026-03-14  6:35         ` Tetsuo Handa
2026-03-16 21:50           ` Viacheslav Dubeyko
2026-03-18  0:37             ` George Anthony Vernon
2026-03-18  2:02               ` Viacheslav Dubeyko
2026-03-18 22:49                 ` George Anthony Vernon
2026-03-19  9:57                   ` Tetsuo Handa
2026-03-19 12:26                     ` George Vernon
2026-03-20  0:32                       ` Tetsuo Handa
2026-05-14  7:34                         ` [PATCH v7] hfs: validate record ID against requested CNID in hfs_cat_find_brec() Tetsuo Handa
2026-05-15 21:10                           ` Viacheslav Dubeyko
2026-05-16  6:17                             ` Tetsuo Handa
2026-05-19 21:09                               ` Viacheslav Dubeyko [this message]
2026-03-18 10:42             ` [PATCH v4] hfs: Validate CNIDs in hfs_read_inode Tetsuo Handa
2026-03-18  0:10   ` George Anthony Vernon
2026-03-18  8:16     ` Tetsuo Handa
2026-03-12 23:07 ` Viacheslav Dubeyko

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=056cb181540c72110b973fcaa0e1b11552623649.camel@ibm.com \
    --to=slava.dubeyko@ibm.com \
    --cc=contact@gvernon.com \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=slava@dubeyko.com \
    --cc=syzbot+97e301b4b82ae803d21b@syzkaller.appspotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®