Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Carlos Maiolino <cem@kernel.org>
To: linux-xfs@vger.kernel.org, Weiming Shi <bestswngs@gmail.com>
Cc: "Darrick J . Wong" <djwong@kernel.org>,
	 Brian Foster <bfoster@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,  Xiang Mei <xmei5@asu.edu>
Subject: Re: [PATCH v3 0/3] xfs: fix NULL deref in log recovery reorder
Date: Tue, 07 Jul 2026 13:37:31 +0200	[thread overview]
Message-ID: <178342425117.389943.13021791343607135682.b4-ty@b4> (raw)
In-Reply-To: <20260702162000.3548359-1-bestswngs@gmail.com>

On Thu, 02 Jul 2026 09:19:57 -0700, Weiming Shi wrote:
> A crafted on-disk log can commit a transaction whose only item is a bare
> transaction header (ri_cnt == 0, ri_buf == NULL).
> xlog_recover_reorder_trans() then runs ITEM_TYPE() on it and dereferences
> the NULL ri_buf, faulting the kernel at mount time.
> 
> v3:
>  - patches 1 and 2: picked up the Reviewed-by tags, plus the
>    s/encountered/encounter/ fix in patch 2 that Darrick noted
>  - patch 3: reworked the changelog per Darrick and Christoph. The empty
>    item comes from the len == sizeof(xfs_trans_header) path; the check can
>    only run at commit time because a split header may still get regions
>    from later ops; and the runtime commit path never emits this, so it is
>    only reachable on a crafted log.  It came from an AI-assisted code
>    audit of the parser.  Added Cc: stable # v4.3.
> 
> [...]

Applied to for-next, thanks!

[1/3] xfs: drop ASSERT(0) on unrecognized log item type
      commit: 5b4396e12cb10fa89ca0a272fae2b5408cfeaa91
[2/3] xfs: splice unsorted log items back to the transaction after the loop
      commit: 34dd2253414d228fc9bf8a70b5f9f83107eda3e1

Best regards,
-- 
Carlos Maiolino <cem@kernel.org>


      parent reply	other threads:[~2026-07-07 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 16:19 [PATCH v3 0/3] xfs: fix NULL deref in log recovery reorder Weiming Shi
2026-07-02 16:19 ` [PATCH v3 1/3] xfs: drop ASSERT(0) on unrecognized log item type Weiming Shi
2026-07-02 16:19 ` [PATCH v3 2/3] xfs: splice unsorted log items back to the transaction after the loop Weiming Shi
2026-07-02 16:20 ` [PATCH v3] xfs: fail recovery on a committed log item with no regions Weiming Shi
2026-07-02 19:45   ` Darrick J. Wong
2026-07-06  6:03   ` Christoph Hellwig
2026-07-07 11:37   ` Carlos Maiolino
2026-07-07 11:37 ` Carlos Maiolino [this message]

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=178342425117.389943.13021791343607135682.b4-ty@b4 \
    --to=cem@kernel.org \
    --cc=bestswngs@gmail.com \
    --cc=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xmei5@asu.edu \
    /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