# Re: \[PATCH v4 1/2\] block: Fix a buffer overrun in bio\_integrity\_split()

- From: Tejun Heo \<hidden\>
- Date: 2012-10-19 20:30:22 
- List: linux-bcache
- Page: https://ratatoskr.run/linux-bcache/2012/10/3942525
- Thread: https://ratatoskr.run/linux-bcache/2012/10/3939710/t.md

```text
On Mon, Oct 15, 2012 at 01:09:01PM -0700, Kent Overstreet wrote:
> bio_integrity_split() seemed to be confusing pointers and arrays -
> bip_vec in bio_integrity_payload was an array appended to the end of the
> payload, so the bio_vecs in struct bio_pair should have come after the
> bio_integrity_payload they're for.
> 
> Fix it by making bip_vec a pointer to the inline vecs - a later patch is
> going to make more use of this pointer.
> 
> Signed-off-by: Kent Overstreet <redacted>
> CC: Jens Axboe <redacted>
> CC: Martin K. Petersen <redacted>

This being an apparent bug, I think it would be better to create a
patch to simply reorder bio_pair fields to fix it and mark it w/ Cc:
stable and introduce bip_vec pointer separately.

Other than that, looks good.

Thanks.

-- 
tejun
```
