Bug 138297 - libapol/policy-io.c:search_policy_src_file segfault in strcpy
libapol/policy-io.c:search_policy_src_file segfault in strcpy
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: setools (Show other bugs)
3
All Linux
medium Severity high
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-07 14:28 EST by Sami Farin
Modified: 2007-11-30 17:10 EST (History)
0 users

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


Attachments (Terms of Use)
fix to calculate path len correctly (523 bytes, patch)
2004-11-07 14:31 EST, Sami Farin
no flags Details | Diff

  None (edit)
Description Sami Farin 2004-11-07 14:28:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041020

Description of problem:
Starting program: /var/rpmbuild/BUILD/setools-1.5.1/secmds/seinfo 

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens
<bruce@perens.com>

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens
<bruce@perens.com>

Program received signal SIGSEGV, Segmentation fault.
0x05acb8a6 in strcpy () from /lib/tls/libc.so.6
(gdb) bt
#0  0x05acb8a6 in strcpy () from /lib/tls/libc.so.6
#1  0x08052659 in search_policy_src_file (policy_file_path=0x80729e4)
at policy-io.c:350
#2  0x080526fd in find_default_policy_file (search_opt=3,
policy_file_path=0x80729e4)
    at policy-io.c:379
#3  0x0804abbf in main (argc=1, argv=0xbfee2f54) at seinfo.c:545

patch attached.



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


How reproducible:
Always

Steps to Reproduce:
1. run seinfo or some other program using the crashy function
2.
3.
    

Actual Results:  strcpy caused segfault in the offending function

Expected Results:  seinfo should have not segfaulted :)


Additional info:

libselinux-1.18.1-4
setools-1.5.1-1
Comment 1 Sami Farin 2004-11-07 14:31:10 EST
Created attachment 106261 [details]
fix to calculate path len correctly
Comment 2 Daniel Walsh 2004-11-08 09:09:29 EST
Applied in setools-1.5.1-2, and notified upstream.

Thanks.

Dan

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