Bug 144878 - restorecon segfaults when no previous context
restorecon segfaults when no previous context
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-12 05:29 EST by Sami Farin
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

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


Attachments (Terms of Use)
check for null pointers in only_changed_user (456 bytes, patch)
2005-01-12 05:31 EST, Sami Farin
no flags Details | Diff

  None (edit)
Description Sami Farin 2005-01-12 05:29:49 EST
Description of problem:
if I e.g. install a new file to /usr/local/bin and run restorecon for it,
it segfaults after setting the context because
param b in function only_changed_user is 0.

Also, on system startup I get segfault errors when restorecon
fails for /tmp/.ICE-unix and other files.

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

How reproducible:
always

Steps to Reproduce:
1. create a new file at almost any dir
2. run restorecon on it
3.
  
Actual results:
restorecon gets killed because it dereferences null pointer

Expected results:
showing that context was restored and exiting normally...

Additional info:
patch attached.  quickie fix, it just checks for null pointers,
works for me,...
Comment 1 Sami Farin 2005-01-12 05:31:16 EST
Created attachment 109661 [details]
check for null pointers in only_changed_user
Comment 2 Daniel Walsh 2005-01-26 09:09:02 EST
Fixed in policycoreutils-1.21.3-2

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