Skip to content

iov_iter: validate first nonempty segment for bvec alignment - #1426

Open
ghost wants to merge 1 commit into
linus-master_basefrom
series/1183633=>linus-master
Open

ghost wants to merge 1 commit into
linus-master_basefrom
series/1183633=>linus-master

Conversation

@ghost

@ghost ghost commented Oct 12, 2026

Copy link
Copy Markdown

Pull request for series with
subject: iov_iter: validate first nonempty segment for bvec alignment
version: 1
url: https://patchwork.kernel.org/series/1183633/

@ghost

ghost commented Oct 12, 2026

Copy link
Copy Markdown
Author

Upstream branch: d5b6dc3
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the linus-master_base branch from ec9266e to 2e69118 Compare October 12, 2026 12:20
@ghost

ghost commented Oct 12, 2026

Copy link
Copy Markdown
Author

Upstream branch: 24a19b9
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 643068a to 6225807 Compare October 12, 2026 12:25
@ghost ghost added the V1-ci-pass label Oct 13, 2026
@ghost
ghost force-pushed the linus-master_base branch from 2e69118 to 3cdd51f Compare October 14, 2026 11:11
@ghost

ghost commented Oct 14, 2026

Copy link
Copy Markdown
Author

Upstream branch: 4056b3c
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 6225807 to a9c0f12 Compare October 14, 2026 11:14
@ghost
ghost force-pushed the linus-master_base branch from 3cdd51f to e6ca2c1 Compare October 14, 2026 15:40
@ghost

ghost commented Oct 14, 2026

Copy link
Copy Markdown
Author

Upstream branch: 0fcb05b
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from a9c0f12 to 356a1f2 Compare October 14, 2026 15:43
@ghost
ghost force-pushed the linus-master_base branch from e6ca2c1 to 3d027d5 Compare October 17, 2026 03:31
@ghost

ghost commented Oct 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 58161ea
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 356a1f2 to ea1dae1 Compare October 17, 2026 03:36
@ghost
ghost force-pushed the linus-master_base branch from 3d027d5 to 90ea7e4 Compare October 19, 2026 00:00
@ghost

ghost commented Oct 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: c03c1a1
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from ea1dae1 to bfcab51 Compare October 19, 2026 00:04
@ghost
ghost force-pushed the linus-master_base branch from 90ea7e4 to 435b194 Compare October 22, 2026 07:21
@ghost

ghost commented Oct 22, 2026

Copy link
Copy Markdown
Author

Upstream branch: 7be4bc5
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from bfcab51 to d60939d Compare October 22, 2026 07:57
@ghost
ghost force-pushed the linus-master_base branch from 435b194 to fd67522 Compare October 24, 2026 03:36
@ghost

ghost commented Oct 24, 2026

Copy link
Copy Markdown
Author

Upstream branch: 17bb0e2
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from d60939d to 42a07f5 Compare October 24, 2026 04:03
@ghost
ghost force-pushed the linus-master_base branch from fd67522 to 3b53a63 Compare October 26, 2026 01:52
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 21a7f44
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 42a07f5 to a99916f Compare October 26, 2026 02:26
@ghost
ghost force-pushed the linus-master_base branch from 3b53a63 to 5d84576 Compare October 26, 2026 07:01
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 6b4b543
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from a99916f to 5ff0fee Compare October 26, 2026 07:30
@ghost
ghost force-pushed the linus-master_base branch from 5d84576 to 6582ed2 Compare October 26, 2026 18:11
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: fb2c3f4
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 5ff0fee to acd4749 Compare October 26, 2026 18:57
@ghost
ghost force-pushed the linus-master_base branch from 6582ed2 to b3a1abc Compare October 26, 2026 23:55
@ghost

ghost commented Oct 27, 2026

Copy link
Copy Markdown
Author

Upstream branch: d135ab4
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from acd4749 to 57a3fa0 Compare October 27, 2026 00:20
@ghost
ghost force-pushed the linus-master_base branch from b3a1abc to 712496f Compare October 28, 2026 23:34
@ghost

ghost commented Oct 29, 2026

Copy link
Copy Markdown
Author

Upstream branch: c339f40
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 57a3fa0 to 4f389cf Compare October 29, 2026 00:00
@ghost
ghost force-pushed the linus-master_base branch from 712496f to a186880 Compare October 30, 2026 13:52
@ghost

ghost commented Oct 30, 2026

Copy link
Copy Markdown
Author

Upstream branch: d89e1d1
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 4f389cf to fc6d23d Compare October 30, 2026 14:52
@ghost
ghost force-pushed the linus-master_base branch from a186880 to 46206a3 Compare November 2, 2026 17:14
@ghost

ghost commented Nov 2, 2026

Copy link
Copy Markdown
Author

Upstream branch: 6628e7d
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from fc6d23d to 5575196 Compare November 2, 2026 18:02
@ghost
ghost force-pushed the linus-master_base branch from 46206a3 to 220bd96 Compare November 3, 2026 23:41
@ghost

ghost commented Nov 4, 2026

Copy link
Copy Markdown
Author

Upstream branch: 05441d6
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 5575196 to 873fd61 Compare November 4, 2026 00:13
@ghost
ghost force-pushed the linus-master_base branch from 220bd96 to 6c4625e Compare November 6, 2026 08:02
@ghost

ghost commented Nov 6, 2026

Copy link
Copy Markdown
Author

Upstream branch: f66469d
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 873fd61 to 41dc502 Compare November 6, 2026 08:53
@ghost
ghost force-pushed the linus-master_base branch from 6c4625e to c7f678d Compare November 7, 2026 03:08
@ghost

ghost commented Nov 7, 2026

Copy link
Copy Markdown
Author

Upstream branch: d487237
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 41dc502 to 846b649 Compare November 7, 2026 03:49
@ghost
ghost force-pushed the linus-master_base branch from c7f678d to 6aa6cd1 Compare November 10, 2026 07:53
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.

Fixes: 14b007e ("block: validate user space vectors during extraction")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
@ghost

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: b3dfbde
series: https://patchwork.kernel.org/series/1183633/
version: 1

@ghost
ghost force-pushed the series/1183633=>linus-master branch from 846b649 to c71ecec Compare November 10, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant