From: Andrew Morton <akpm@linux-foundation.org>
To: Daehyeon Ko <4ncienth@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>,
Hannes Reinecke <hare@kernel.org>,
linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iov_iter: validate first nonempty segment for bvec alignment
Date: Mon, 12 Oct 2026 11:47:35 -0700 [thread overview]
Message-ID: <20261012114735.896effbe08a5b8c03d1774fa@linux-foundation.org> (raw)
In-Reply-To: <20261012065520.1089147-1-4ncienth@gmail.com>
On Mon, 12 Oct 2026 15:55:20 +0900 Daehyeon Ko <4ncienth@gmail.com> wrote:
> iov_iter_extract_bvecs() checks the current IOVEC or KVEC segment against
> the block device's DMA alignment before extracting pages. Empty segments
> are valid, but the check uses iter_iov_addr() and iter_iov_len() directly
> while first_iovec_segment(), used by the extraction path, skips them.
>
> An aligned empty segment followed by a misaligned nonempty segment
> therefore passes the check and produces misaligned bvecs. An unprivileged
> O_DIRECT preadv() reproduced this on a regular ext4 file above brd. The
> equivalent nonempty-leading vector returned -EINVAL, while the
> empty-leading vector completed 4096 bytes. This bypasses the validation
> added for CVE-2026-89584.
>
> When the current segment is empty but the iterator still contains data, use
> first_iovec_segment() to select and validate the same segment that page
> extraction will use. Keep the existing constant-time fast path for the
> normal nonempty case.
Thanks.
Sashiko:
https://sashiko.dev/#/patchset/20261012065520.1089147-1-4ncienth@gmail.com
It looks like that issue is pre-existing, but could also be addressed
by altering your proposed change.
prev parent reply other threads:[~2026-10-12 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 6:55 Daehyeon Ko
2026-10-12 18:47 ` Andrew Morton [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=20261012114735.896effbe08a5b8c03d1774fa@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=4ncienth@gmail.com \
--cc=axboe@kernel.dk \
--cc=hare@kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®