Bug 498861 - Crash while trying to set SELinux security context
Crash while trying to set SELinux security context
Status: CLOSED DUPLICATE of bug 498102
Product: Fedora
Classification: Fedora
Component: patch (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-05-04 01:03 EDT by Pavel Roskin
Modified: 2009-06-10 05:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-10 05:12:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pavel Roskin 2009-05-04 01:03:41 EDT
Description of problem:
The "patch" utility crashed for me several times when I was trying to apply a patch.

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

How reproducible:
I cannot reproduce it, but anyone versed in SELinux should be able to.

Steps to Reproduce:
1. Apply a patch to some sources.
Actual results:
Segmentation fault.

Expected results:
The patch is applied.

Additional info:

I'm using a kernel without SELinux support.  The sources are located on a ext4 partition.

(gdb) where
#0  0x0000003fa347fc00 in strcmp () from /lib64/libc.so.6
#1  0x0000000000408233 in main (argc=8, argv=<value optimized out>) at patch.c:420
(gdb) up
#1  0x0000000000408233 in main (argc=8, argv=<value optimized out>) at patch.c:420
420                               if (strcmp(outcontext, incontext) && 
(gdb) p outcontext
$1 = (security_context_t) 0x0
(gdb) p incontext
$2 = (security_context_t) 0x162f6e0 "system_u:object_r:user_home_t:s0"
(gdb) p outname
$3 = 0x162e270 "fs/ntfscomp.c"
(gdb) p inerrno 
$4 = 0
(gdb) p inname
$5 = 0x162e270 "fs/ntfscomp.c"
Comment 1 Tim Waugh 2009-05-05 07:58:32 EDT
Please try this package:

Does that fix the problem?
Comment 2 Sergio Monteiro Basto 2009-05-10 01:14:31 EDT
ok I got the same problem patch-2.5.4-38.fc11.i586

and I'm using a kernel without SELinux support 

on dmesg appears: 
patch[19635]: segfault at 0 ip 006a4308 sp bfa6793c error 4 in libc-2.9.90.so[62b000+16d000]

rpm -Uvh http://kojipkgs.fedoraproject.org/packages/patch/2.5.4/39.fc11/i586/patch-2.5.4-39.fc11.i586.rpm

solved the problem thanks,
Comment 3 Pavel Roskin 2009-05-10 10:25:26 EDT
I can reproduce the crash now by setting some security attributes with "chcon" and applying a patch to that file.  I confirm that the new build fixes the crash.
Comment 4 Bug Zapper 2009-06-09 11:05:55 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 5 Tim Waugh 2009-06-10 05:12:16 EDT

*** This bug has been marked as a duplicate of bug 498102 ***

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