Lind-Project / native_client

native_client trusted code base
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Fix Program Counter on Fork #158

Closed rennergade closed 6 months ago

rennergade commented 6 months ago

Description

This fixes a segfault in situations where a child cage is forked and the parent immediately exists. Here the child program counter isnt properly adjusted and still points to the parents address space. Because the parent frees its address space, the program faults. It's pretty crazy that this one took this long to catch, but because of how NaCl is setup, as long as it enters the code correctly the addresses are then properly located after the point of entry which made this tricky to find.

Type of change

How Has This Been Tested?

All test suites and applications

Checklist: