test(libkernel): audit sysctl kern.proc.* process, pathname, env, and vmmap bounds #22483
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22483"
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 slopgobblercobbler on 2026-11-17T17:35:45Z.
What
Audit
libkernelsysctlkern.proc.*process, pathname, env, and vmmap bounds perdocs/dev/debt/libkernel.md.GuestKernelSysctlProcBounds.cppauditingsysctlqueries acrosskern.proc.*.{1, 14, 12, pid}accepting self pid and -1 returning/app0/eboot.bin, rejecting foreign/negative pids withESRCH, short bufferENOMEM, write rejectionEPERM, length bounds,sysctlbynamereturningEINVAL, andsysctlnametomibresolving to{1, 14, 12}with size queries and short bufferENOMEM.{1, 14, 8}returning 1088-bytekinfo_procmatching self pid, parent pid, andeboot.bin, short bufferENOMEM, write rejectionEPERM,sysctlbynameparity, andsysctlnametomib.{1, 14, 1, pid}accepting only self pid, rejecting foreign pids and -1 withESRCH, write rejectionEPERM, and short bufferENOMEM.{1, 14, 35, pid}returning 0 bytes, rejecting foreign pids and -1 withESRCH.{1, 14, 32, pid}returning packed 144-bytekinfo_vmentryrecords with validstructSize/type/start/end bounds, rejecting foreign pids withESRCH.runtime_error, MIB length bounds 0, 1, 25, null pointerEFAULT, andsysctlnametomibnull pointer checks.guest_kernel_sysctl_proc_bounds_testsincore/libs/prx/libkernel/CMakeLists.txtlinked againstlibkernel,libc, and Windows unwind support.Tested
guest_kernel_sysctl_proc_bounds_testsverifying all assertions pass.python tools/check_conventions.py --base upstream/main --head HEAD(0 findings).guest_kernel_sysctl_proc_bounds_testsbuilt cleanly and passed (1/1 test passed).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 PrivacyOnion on 2026-11-17T17:39:23Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
2c970a1054:tools/check_conventions.pyfailed.guest_kernel_sysctl_proc_bounds_testsbuilt cleanly.guest_kernel_sysctl_proc_bounds):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T17:22:54Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
26327d4755:tools/check_conventions.pypassed.guest_kernel_sysctl_proc_bounds_testsbuilt cleanly.guest_kernel_sysctl_proc_bounds):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T17:26:14Z.
Review: APPROVED
Reviewed — looks good
Nothing in the reviewed test and registration changes blocks merge; the assertions align with the documented
kern.proc.*behavior.What I ran
Reviewed head
26327d4755395513964e1e8b7050e128ee1deba0using the pinnedrepo_read.pyreader. No commands or tests were run; reported test results below are author supplied.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The test was not built or executed during this review. The author reports a standalone pass and a Linux CI pass; those results were not independently verified. No other changed files were excluded: both files in the manifest were read.
files.jsonwas not available through the reader.To get this to a good state
Nothing is required.
Pull request closed