Bug 1254032 - 8.1.1 advice on using getpid to avoid fork problems is dangerously wrong
8.1.1 advice on using getpid to avoid fork problems is dangerously wrong
Status: NEW
Product: Fedora Documentation
Classification: Fedora
Component: defensive-coding-guide (Show other bugs)
devel
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Florian Weimer
Fedora Docs QA
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-16 20:22 EDT by Steven Stewart-Gallus
Modified: 2015-08-16 20:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steven Stewart-Gallus 2015-08-16 20:22:22 EDT
Description of problem:

If one forks a process, the original process dies and then the second one forks again the last forked process can have the same pid as the original and so getpid will not detect a change.  This was a widely noted weakness in LibreSSL (see https://www.agwa.name/blog/post/libressls_prng_is_unsafe_on_linux.)

How reproducible:

This is very probably systematically reproducible in possibly affected libraries but in practise should never really happen.

Note You need to log in before you can comment on or make changes to this bug.