Repository navigation
fix(apr): reject submissions beyond buffer capacity - #5553
Closed
cookie42073-cmd wants to merge 1 commit into
Closed
cookie42073-cmd wants to merge 1 commit into
cookie42073-cmd wants to merge 1 commit into
Conversation
This was referenced Oct 14, 2026
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Collaborator
|
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Hi, this is Blazing Cook.
APR submission passes the recorded length to the executor and queued copy without checking the object's capacity. A buffer containing two valid writes, with its declared capacity reduced to the first write, still executes both. This checks the original descriptor before
_submit, so all three submission exports reject an offset beyond capacity without executing commands, consuming an ID or changing the result/ID outputs.This follows up on the remaining submission-capacity check from item 2 of #3321. The error uses the exports' existing
-1/guestEINVALpath. Native PS5 behavior for a corrupted opaque buffer remains unverified and is recorded in technical debt. No title unblock is claimed.Tested
Windows x64, MinGW-w64 GCC 15.2.0, Release, Tracy disabled.
Tested base:
d1670009fbfdfe57f8f26ee09ced77fe6b18c2ca. Fix:0081a8bd9277973ed09034521c574daefc4ec0d5.guest_ampr_markersregression fails on the upstream APR implementation because it returns success and executes both writes; it passes with the two submission guards. The test covers all three exports with an idle queue and with a blocked command ahead, unchanged outputs/backing/object fields, no consumed submission ID, exact capacity and empty buffers.libstarget; seven selected CTest tests:guest_ampr_markers,guest_ampr_threads,guest_amm_placement,guest_memory,guest_addresses,guest_mlock,guest_mutex_contention. All passed. The registered APR regression also passed five consecutive runs with normal process exit.An auxiliary short-process probe intermittently hangs during Windows DLL teardown. The same unchanged valid-submission control reproduces it on
d1670009and the fixed runtime; debugger stacks put it in libkernel CRT detach duringLdrShutdownProcess. That separate exit issue is not fixed here. The registered regression completes normally. Linux, native PS5 and commercial games were not tested.Checklist
main; no other open PR implements the same functions