Linux EXT4 FS development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ding Feng" <dingf3ng@gmail.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] ext4: apply RLIMIT_FSIZE to FALLOC_FL_INSERT_RANGE
Date: Thu, 03 Dec 2026 05:31:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-247200@kernel.org> (raw)
In-Reply-To: <20261203052448.53714-1-dingf3ng@gmail.com>

> ext4_insert_range() grows i_size by len but checks the new size only
> against s_maxbytes, so an insert can take a file past the caller's
> RLIMIT_FSIZE. On the same file, ftruncate() and an extending fallocate()
> fail with EFBIG and SIGXFSZ, and XFS refuses the insert.
> 
> With a 4096-byte file and RLIMIT_FSIZE 4096, on v7.4-rc5 (x86_64, QEMU):
> 
>   ext4  FALLOC_FL_INSERT_RANGE(0, 4096)  ->  0, size 8192
>   xfs   FALLOC_FL_INSERT_RANGE(0, 4096)  ->  EFBIG, size 4096
> 
> The same gap in the SMB client was fixed as CVE-2026-98127 ("smb/client:
> validate new EOF for insert range").
> 
> Check the new size with inode_newsize_ok(), which sends SIGXFSZ and
> returns -EFBIG when it exceeds RLIMIT_FSIZE.
> 
> Fixes: 331573febb6a ("ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ding Feng <dingf3ng@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203052448.53714-1-dingf3ng@gmail.com?part=1

  reply	other threads:[~2026-12-03  5:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  5:24 [PATCH] ext4: apply RLIMIT_FSIZE to FALLOC_FL_INSERT_RANGE Ding Feng
2026-12-03  5:31 ` sashiko-bot [this message]
2026-12-03  9:35 ` Christoph Hellwig
2026-12-03 10:21 ` Jan Kara

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=sashiko-outbox-247200@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dingf3ng@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tytso@mit.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