This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19957] New: clone(CLONE_VM) access invalid parent memory
- From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 15 Apr 2016 19:40:31 +0000
- Subject: [Bug libc/19957] New: clone(CLONE_VM) access invalid parent memory
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19957
Bug ID: 19957
Summary: clone(CLONE_VM) access invalid parent memory
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: adhemerval.zanella at linaro dot org
CC: drepper.fsp at gmail dot com
Target Milestone: ---
As stated in previous bug reports [1] [2] [3], clone(CLONE_VM) reset the
pthread pid/tid to -1 leading to inconsistent internal state.
This has not been an issue since clone itself is a trick syscall when used
along with glibc (since glibc requires consistent pthread internal state),
however recent posix_spawn shown this issue because it using internally
clone(CLONE_VM) in a controlled way (just to spawn the new thread).
In the libc-alpha mailist [4] discussion was raised the question why exactly
clone(CLONE_VM) requires to clear the pthread and it was concluded that in fact
it is wrong to mess with parent's thread structure. The proposed solution is,
like CLONE_THREAD, avoid to clear the pid/tid fields for CLONE_VM.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=10311
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=18006
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=18862
[4] https://sourceware.org/ml/libc-alpha/2016-04/msg00307.html
--
You are receiving this mail because:
You are on the CC list for the bug.