Bug 126486 - [PATCH] suid binaries without exec permission can be executed
Summary: [PATCH] suid binaries without exec permission can be executed
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ia32el   
(Show other bugs)
Version: 3.0
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords: Security
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-22 11:30 UTC by Yoav Zach
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version: 1.0-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-02 17:52:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fixes the problem with suid_libia32x.so (2.17 KB, patch)
2004-06-22 11:32 UTC, Yoav Zach
no flags Details | Diff

Description Yoav Zach 2004-06-22 11:30:35 UTC
Description of problem:
a user can execute suid binaries even when not having exec permission 
for them by calling suid_libia32x.so and passing it a file descriptor 
of the suid binary open for read.

Version-Release number of selected component (if applicable):
suid_libia32x.so : 4602

How reproducible:

Steps to Reproduce:
1. prepare a root owned setuid binary - 'exec_as_root'
2. deny exec rights from a regular user - 'johndoe'
3. prepare a program 'xx' that opens 'exec_as_root' for reading and
   then calls execl ("/usr/lib/ia32el/suid_libia32x.so", 
                      "suid_libia32x.so", fd_str, NULL);
   where fd_str is a string containing the fd of exec_as_root

  
Actual results:
exec_as_root will be executed

Expected results:
permission denied

Additional info:

Comment 1 Yoav Zach 2004-06-22 11:32:00 UTC
Created attachment 101330 [details]
fixes the problem with suid_libia32x.so

the patch addes to suid_libia32x.so a check for exec permissions before
starting emulation of the 32 bit binary.

Comment 2 Yoav Zach 2004-06-22 11:33:02 UTC
in 'steps to reproduce' above - the exec_as_root needs to be i386 
binary


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