Skip to content

[ciqlts9_4] iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()#948

Open
ciq-kernel-automation[bot] wants to merge 1 commit intociqlts9_4from
{ciq_kernel_automation}_ciqlts9_4
Open

[ciqlts9_4] iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()#948
ciq-kernel-automation[bot] wants to merge 1 commit intociqlts9_4from
{ciq_kernel_automation}_ciqlts9_4

Conversation

@ciq-kernel-automation
Copy link

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()

jira VULN-53567
cve CVE-2025-21724
commit-author Qasim Ijaz <qasdev00@gmail.com>
commit e24c1551059268b37f6f40639883eafb281b8b9c

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 28m 44s 31m 38s
aarch64 16m 42s 18m 58s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed
x86_64 187 31
aarch64 146 30

Test Comparison

x86_64:

  • ⚠️ Status: Skipped - No baseline available

aarch64:

  • ⚠️ Status: Skipped - No baseline available

🤖 This PR was automatically generated by GitHub Actions
Run ID: 22854664025

…_index()

jira VULN-53567
cve CVE-2025-21724
commit-author Qasim Ijaz <qasdev00@gmail.com>
commit e24c155

Resolve a UBSAN shift-out-of-bounds issue in iova_bitmap_offset_to_index()
where shifting the constant "1" (of type int) by bitmap->mapped.pgshift
(an unsigned long value) could result in undefined behavior.

The constant "1" defaults to a 32-bit "int", and when "pgshift" exceeds
31 (e.g., pgshift = 63) the shift operation overflows, as the result
cannot be represented in a 32-bit type.

To resolve this, the constant is updated to "1UL", promoting it to an
unsigned long type to match the operand's type.

Fixes: 58ccf01 ("vfio: Add an IOVA bitmap support")
Link: https://patch.msgid.link/r/20250113223820.10713-1-qasdev00@gmail.com
	Reported-by: syzbot <syzbot+85992ace37d5b7b51635@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=85992ace37d5b7b51635
	Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
	Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
	Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
(cherry picked from commit e24c155)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/22863962591

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/22863962591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

0 participants