fix(libkernel): return EFAULT from sysctlnametomib for invalid memory pointers #13854
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13854"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by DeveshB-1 on 2026-10-31T09:33:26Z.
What
Safely copies
nameviaCopyGuestPath_nid_no_patch, safely copiessizein and out viaGuestCopyIn_nid_no_patchandGuestCopyOut_nid_no_patch, and propagates copy-out errors incopyMib, returning -1 withEFAULT(14) if any pointer is unreadable or unwritable instead of faulting host memory. Updates thelibkernel.mddebt entry and adds guest pointer fault tests inGuestSystemConfiguration.cpp.Tested
Linux (Arch Linux x86_64),
ctest --test-dir build -R guest_system_configuration -V. Verified negative control crashes withSIGSEGVon unmodified code and passes deterministically with this change. Verifiedpython3 tools/check_conventions.py --base origin/mainandpython3 tools/pr_overlap.py --branch fix/sysctlnametomib-efault(no overlap across 1,618 open PRs).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T09:36:09Z.
Review: APPROVED
Reviewed — looks good
The exact-head change routes guest name, size and MIB accesses through the guest-memory helpers, and its focused fault cases cover unreadable and unwritable pointers.
What I ran
Reviewed head
dd46d6ada363d683bbf6dae6d79cf81dc4a7f930against basec3c45d73abd34dca81da6bad87cb6d36ea437a66; the current-main merge preview was clean. Environment: Linux x86-64, Python 3.11.2. The no-build precheck's diff and conventions checks passed.The precheck's ABI-audit and test-quality helper commands were unavailable in its isolated checkout. The PR reports
ctest --test-dir build -R guest_system_configuration -Vand a negative control; I did not run those locally. Hosted checks were still queued or running at review time.Sources
Reviewed the pinned implementation and pointer fault tests.
Not verified
I did not build locally, run the CTest suite, independently reproduce the negative control, or verify console behavior. Hosted CI was not complete.