Bug 126486 - [PATCH] suid binaries without exec permission can be executed
[PATCH] suid binaries without exec permission can be executed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ia32el (Show other bugs)
3.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-22 07:30 EDT by Yoav Zach
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.0-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-02 13:52:29 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)
fixes the problem with suid_libia32x.so (2.17 KB, patch)
2004-06-22 07:32 EDT, Yoav Zach
no flags Details | Diff

  None (edit)
Description Yoav Zach 2004-06-22 07:30:35 EDT
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 07:32:00 EDT
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 07:33:02 EDT
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.