-
Bug
-
Resolution: Fixed
-
P3
-
11, 12, 13
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8225971 | 14 | Thomas Stuefe | P3 | Resolved | Fixed | team |
JDK-8236637 | 11.0.7-oracle | Ravi Reddy | P3 | Resolved | Fixed | b02 |
JDK-8226630 | 11.0.5 | Thomas Stuefe | P3 | Resolved | Fixed | b01 |
While working on JDK-8223777, I spotted (childstuff.c) the following problem:
In error handling code (WhyCantJonnyExec) child signals error to parent by writing an error code to the fail pipe. It does that using the hard wired fail pipe write-end fd (FAIL_FILENO, usually 4). But that only works as intended after the fail pipe write end has been successfully dup2'ed to FAIL_FILENO.
If an error happens before that, error code will still be written to FAIL_FILENO, which may be an invalid file handle - which is almost benign - or refer to an unrelated file descriptor the child inherited and did not close yet - which is not good.
In error handling code (WhyCantJonnyExec) child signals error to parent by writing an error code to the fail pipe. It does that using the hard wired fail pipe write-end fd (FAIL_FILENO, usually 4). But that only works as intended after the fail pipe write end has been successfully dup2'ed to FAIL_FILENO.
If an error happens before that, error code will still be written to FAIL_FILENO, which may be an invalid file handle - which is almost benign - or refer to an unrelated file descriptor the child inherited and did not close yet - which is not good.
- backported by
-
JDK-8225971 On child process spawn, child may write to random file descriptor instead of the fail pipe
- Resolved
-
JDK-8226630 On child process spawn, child may write to random file descriptor instead of the fail pipe
- Resolved
-
JDK-8236637 On child process spawn, child may write to random file descriptor instead of the fail pipe
- Resolved
- relates to
-
JDK-8223777 In posix_spawn mode, failing to exec() jspawnhelper may not result in an error
- Closed