The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Michael Bommarito <michael.bommarito@gmail.com>
To: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Please consider 83f99de1b7c0 ("ext2: fix race between setxattr and write back") for 5.10.y, 5.15.y, and 6.1.y
Date: Thu,  9 Jul 2026 22:31:42 -0400	[thread overview]
Message-ID: <20260710023142.3748810-1-michael.bommarito@gmail.com> (raw)

Please consider the following already-mainlined fix for the stable
series listed below.

Upstream commit: 83f99de1b7c0dcfa42b211e5e40334b7ad786b36
Subject: ext2: fix race between setxattr and write back

This is a stable option-2 request for an already-mainlined fix. The
patch fixes a security-relevant bug pattern that remains present in the
listed stable branches in my current review.

Why this belongs in stable:
ext2_xattr_set2 allocates a block via the reservation window
concurrently with writeback (ext2_get_blocks), tripping rsv_window_dump
BUG() in ext2_try_to_allocate_with_rsv (panic/DoS); fix absent in the
checked stable branches and the unguarded reservation path plus
reservation-using xattr allocation are still present there.

Requested stable series:
- 5.10.y
- 5.15.y
- 6.1.y

Fresh stable check (2026-07-08):
- 5.10.y: 738ac465e4e9
  fix shape: absent; upstream diff: needs-adjustment
- 5.15.y: c86c4726e7f0
  fix shape: absent; upstream diff: needs-adjustment
- 6.1.y: 090666d3cc90
  fix shape: absent; upstream diff: needs-adjustment
- 6.6.y and newer checked longterms already have the fixed shape

The source-shape check looked for both the EXT2_ALLOC_NORESERVE xattr
allocation call and the matching reservation guard in fs/ext2/balloc.c.
Those are absent in the requested branches and present in the checked
6.6.y, 6.12.y, and 6.18.y branches.

Backport note:
The mechanical check above reports whether the upstream diff applies to
each listed branch as-is. Branches marked needs-adjustment may need an
equivalent stable backport rather than a straight cherry-pick.
The current upstream diff fails in fs/ext2/xattr.c at the same hunk on
5.10.y, 5.15.y, and 6.1.y, so an adjusted backport is expected for all
three requested series.

Impact: a local user with write access to an already-mounted writable
ext2 filesystem with user xattrs enabled can trigger a kernel BUG/oops
through user.* xattr churn and writeback pressure. I do not have evidence
for privilege escalation, code execution, or confidentiality/integrity
impact; this is an availability issue. My current CVSS 3.1 estimate for
that mounted-ext2 scope is 5.5.

Direct-tracking exposure in my current review includes Debian 11,
Debian 12, Amazon Linux 2023, and Android 13/14/15 GKI. Vendor trees
that do not directly track the above stable branches need separate
per-tree checks.

Primary touched files: fs/ext2/balloc.c, fs/ext2/xattr.c

No reproducer is included in this public stable request. I can provide
additional details privately if needed.

             reply	other threads:[~2026-07-10  2:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10  2:31 Michael Bommarito [this message]
2026-07-10 11:28 ` Please consider 83f99de1b7c0 ("ext2: fix race between setxattr and write back") for 5.10.y, 5.15.y, and 6.1.y Theodore Tso
2026-07-11 20:09   ` Michael Bommarito

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=20260710023142.3748810-1-michael.bommarito@gmail.com \
    --to=michael.bommarito@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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