libkernel debt: note how titles call inet_pton #10161

Closed
opened 2026-10-23 11:25:42 +00:00 by xXPBSXx · 0 comments
xXPBSXx commented 2026-10-23 11:25:42 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-23T11:25:42Z.


The debt entry in docs/dev/debt/libkernel.md does not record how a title calls the function. A title call site adds this (call-site addresses included so the reading can be checked).

The changed entry now reads:

inet_ntop, inet_pton (libkernel) - an AF_INET6 result of inet_ntop is followed by zero bytes up to size. In a payload process on a PS5 (firmware 12.70), the text forms, the order of the checks and this padding were measured through both exports. The padding was sampled at sizes from 3 to 65536, above 64 only at 65, 128, 256, 1024, 4096 and 65536; the sizes that were not sampled, sizes above 65536 and a title process are assumed to behave the same. Two titles (PPSA03001 at 0x249355d, PPSA07426 at 0x186d3ca) disassembled for this entry call inet_pton once each with the family constant 2 and test only whether the result is 0, so 1 and -1 both take the use path; what they do with AF_INET6 is not shown.

Fix: branch docs/debt-kernel-inet-pton-title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5996888734 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/10161). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-23T11:25:42Z. --- The debt entry in `docs/dev/debt/libkernel.md` does not record how a title calls the function. A title call site adds this (call-site addresses included so the reading can be checked). The changed entry now reads: > [inet_ntop, inet_pton](../../../core/libs/prx/libkernel/Socket/src/AddressConversion.cpp) (libkernel) - an `AF_INET6` result of `inet_ntop` is followed by zero bytes up to `size`. In a payload process on a PS5 (firmware 12.70), the text forms, the order of the checks and this padding were measured through both exports. The padding was sampled at sizes from 3 to 65536, above 64 only at 65, 128, 256, 1024, 4096 and 65536; the sizes that were not sampled, sizes above 65536 and a title process are assumed to behave the same. Two titles (PPSA03001 at 0x249355d, PPSA07426 at 0x186d3ca) disassembled for this entry call `inet_pton` once each with the family constant 2 and test only whether the result is 0, so 1 and -1 both take the use path; what they do with `AF_INET6` is not shown. Fix: branch `docs/debt-kernel-inet-pton-title`. AI-assisted (Claude Code).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#10161
No description provided.