Skip to content

webrte-1.06

Choose a tag to compare

@github-actions github-actions released this 28 Aug 01:00
Stop the allproc walk from following a dangling pointer

proc_find_by_pid and proc_find_by_name walk allproc with no lock held and no
reference taken on what they return. When a process exits mid-walk the next
p_forw is freed memory, and dereferencing it panics the kernel - which is why
touching a long-lived process like SceShellCore is fine while touching an app
that is starting and stopping takes the console down.

The lock cannot be taken from here, so this does not remove the race. It does
stop the walk from running off into unmapped memory: each link is checked for
a plausible kernel address before it is dereferenced, and the walk is bounded
so a corrupted list terminates instead of running forever.

Callers should still avoid hammering these paths.