Re: [PATCH v5] block: bio-integrity: Fix null-ptr-deref in bio_integrity_map_user()
From: Jens Axboe
Date: Tue May 12 2026 - 12:03:21 EST
On Tue, 12 May 2026 01:09:29 -0400, Sungwoo Kim wrote:
> pin_user_pages_fast() can partially succeed and return the number of
> pages that were actually pinned. However, the bio_integrity_map_user()
> does not handle this partial pinning. This leads to a general protection
> fault since bvec_from_pages() dereferences an unpinned page address,
> which is 0.
>
> To fix this, add a check to verify that all requested memory is pinned.
> If partial pinning occurs, unpin the memory and return -EFAULT.
>
> [...]
Applied, thanks!
[1/1] block: bio-integrity: Fix null-ptr-deref in bio_integrity_map_user()
commit: 8582792cf23b3d94674d4d838f7cde9a28d0fcaf
Best regards,
--
Jens Axboe