Bug 498861 - Crash while trying to set SELinux security context
Summary: Crash while trying to set SELinux security context
Keywords:
Status: CLOSED DUPLICATE of bug 498102
Alias: None
Product: Fedora
Classification: Fedora
Component: patch
Version: 11
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-04 05:03 UTC by Pavel Roskin
Modified: 2009-06-10 09:12 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-06-10 09:12:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pavel Roskin 2009-05-04 05:03:41 UTC
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):
2.5.4-38.fc11

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"
(gdb)

Comment 1 Tim Waugh 2009-05-05 11:58:32 UTC
Please try this package:
  https://koji.fedoraproject.org/koji/buildinfo?buildID=100263

Does that fix the problem?

Comment 2 Sergio Basto 2009-05-10 05:14:31 UTC
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 14:25:26 UTC
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 15:05:55 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Tim Waugh 2009-06-10 09:12:16 UTC

*** 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.