Page MenuHomeFreeBSD

ptrace: clear TDP_USERWR after transparent attach only on attach
ClosedPublic

Authored by kib on Mon, May 11, 1:16 AM.
Tags
None
Referenced Files
F156970720: D56928.id177564.diff
Sun, May 17, 5:24 PM
F156922205: D56928.id177563.diff
Sun, May 17, 9:22 AM
F156922146: D56928.id177563.diff
Sun, May 17, 9:22 AM
F156922123: D56928.id177563.diff
Sun, May 17, 9:22 AM
F156917622: D56928.diff
Sun, May 17, 8:34 AM
F156900345: D56928.diff
Sun, May 17, 5:09 AM
F156849284: D56928.diff
Sat, May 16, 9:40 PM
Unknown Object (File)
Fri, May 15, 7:30 PM
Subscribers

Details

Summary
The flag indicates that the modifying ptrace op was issued, and clearing
it after transparent attach is needed to not leak the flag to later
operations, since it is cleared on the syscall enter.

But clearing it there unconditionally is too strong.  The clearing
should be only done for attach situation.

Reported by:    Alex S <iwtcex@gmail.com>
Fixes:  99976934274de6fa19f049a0b6eac10856710f96

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Mon, May 11, 1:16 AM
kib retitled this revision from ptrace: do no clear TDP_USERWR when fixing PT_CONTINUE after transparent attach to ptrace: clear TDP_USERWR after transparent attach only on attach.
kib edited the summary of this revision. (Show Details)

Still clear on attach.

Is there a test case which illustrates the problem?

This revision is now accepted and ready to land.Wed, May 13, 4:13 PM