NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/60907: i915: partial page view indexing error
>Number: 60907
>Category: kern
>Synopsis: i915: partial page view indexing error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 20 13:05:00 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10
>Organization:
The PartialGGTT Overrun, Inc.
>Environment:
>Description:
The logic in intel_partial_pages takes an object with a DMA map
for pages [0,n) and a view [offset,offset+size) with
0 <= offset <= offet + size <= n
and creates a DMA map just for pages [offset,offset+size).
However, owing to an indexing error, it may create some bogus
addresses past the end of one of the segments.
In particular, if the object has a segment {.ds_addr, .ds_len}
for the left part of pages [offset,offset+size) so that the
partial view requires taking the right part from the next
segment, some of the pages in the middle might be instead taken
to be .ds_addr + .ds_len, .ds_addr + .ds_len + PAGE_SIZE,
.ds_addr + .ds_len + 2*PAGE_SIZE, and so on.
>How-To-Repeat:
code inspection
>Fix:
- k < iseg->ds_len >> PAGE_SHIFT);
+ k < (iseg->ds_len - offset) >> PAGE_SHIFT);
plus some assertions to sanity-check the arithmetic
Home |
Main Index |
Thread Index |
Old Index