Bug 481146 - phosphor crashes due to derefencing NULL FILE*
phosphor crashes due to derefencing NULL FILE*
Product: Fedora
Classification: Fedora
Component: xscreensaver (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-01-22 07:58 EST by John Sullivan
Modified: 2009-01-23 21:43 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-23 21:43:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed fix (526 bytes, patch)
2009-01-22 07:58 EST, John Sullivan
no flags Details | Diff

  None (edit)
Description John Sullivan 2009-01-22 07:58:44 EST
Created attachment 329709 [details]
proposed fix

Description of problem:

When (without -pipe) the child exits, state->pipe is cleared but state->pid is not. Later on, state->pid is used to determine whether to send a message to the child (via state->pipe) it tests only the value of state->pid.

This can be forced by running with -window and resizing the window between child runs (which attempts to ioctl TIOCWINSZ on the pipe).

Version-Release number of selected component (if applicable):


How reproducible:

The resize case, very. I think there's another semi-random crash case too though.

Steps to Reproduce:
1. Run phosphor with -window
2. Resize window
Actual results:


Expected results:


Additional info:

Attached patch does two things: clear state->pid once we know the child has exited, and check state->pipe before attempting to dereference it.
Comment 1 Mamoru TASAKA 2009-01-22 08:54:40 EST
Well, I can reproduce what you see and your proposal patch
seems reasonable. I will release the modified xscreensaver,
Comment 2 Mamoru TASAKA 2009-01-22 10:45:11 EST
5.08-5.fc{11,10,9} is submitted:
For F-9:
Comment 3 Fedora Update System 2009-01-23 21:39:42 EST
xscreensaver-5.08-5.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2009-01-23 21:43:10 EST
xscreensaver-5.08-5.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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