aboutsummaryrefslogtreecommitdiff
path: root/src/core/launch_params.cpp
diff options
context:
space:
mode:
authorSssnowyyy <78863999+Sssnowyyy@users.noreply.github.com>2026-11-02 11:27:20 -0500
committerSssnowyyy <78863999+Sssnowyyy@users.noreply.github.com>2026-11-02 14:53:47 -0500
commite277b4ba61694f229b38ec0dc62f31c35d0cbff3 (patch)
tree5a89d43ccd30da38ad8c3423344d091d0b3f7267 /src/core/launch_params.cpp
parent089105ab44c87f1ef0526221144a1979c56558e6 (diff)
nx2: make the 216 sparse request range checks overflow-safe
4d6a13e3d9 and 3d6156434a added bounds checks to the nx2:gpu 216 sparse map path, but the region checks still compute gpu_address + size, which wraps for a guest-controlled size. 3d6156434a only guards size == 0 and the memory offset on the map path, so an unmap (memory handle 0) with a huge size matches a region through the wrapped sum and reaches Nx2SparseTile, whose own check wraps the same way, and then smmu.Unmap(device, size) with a giant page count. Reject a request whose end wraps the address space before it is used, for map and unmap alike, with a warning like the existing unknown-memory check. Also compare by subtraction in the region lookups here and in Nx2SparseTile and Nx2BackSparse, so none of them depends on the sum. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
Diffstat (limited to 'src/core/launch_params.cpp')
0 files changed, 0 insertions, 0 deletions