Skip to content

block: bio: check offset/length sanity in {__,}bio_add_page()#998

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1116139=>linus-master
Open

block: bio: check offset/length sanity in {__,}bio_add_page()#998
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1116139=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

Pull request for series with
subject: block: bio: check offset/length sanity in {__,}bio_add_page()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1116139

@blktests-ci

blktests-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Author

Upstream branch: bade58e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116139
version: 1

@blktests-ci

blktests-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 4edcdef
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116139
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1116139=>linus-master branch from c264fdb to 943dcaa Compare June 26, 2026 08:37
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 4cc45a3 to 90ffd56 Compare June 29, 2026 17:14
Sum of the *struct* bio_vec's fields bv_offset and bv_len is calculated in
some functions in block/{blk-merge.c,blk.h> (and that sum is often compared
to PAGE_SIZE) -- that sum may overflow (and so the comparison yield a wrong
result) if some bad arguments were previusly passed to {__,}bio_add_page().
Add a check that the sum of the offset and length parameters won't overflow
to {__,}bio_add_page()...

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
@blktests-ci

blktests-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Author

Upstream branch: dc59e4f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116139
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1116139=>linus-master branch from 943dcaa to 689bfb6 Compare June 29, 2026 17:43
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.

0 participants