Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690028 - Allow to load libc.so shared library without RTLD_DEEPBIND
Summary: Allow to load libc.so shared library without RTLD_DEEPBIND
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: uid_wrapper
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-18 15:43 UTC by Lukas Slebodnik
Modified: 2019-03-18 20:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Lukas Slebodnik 2019-03-18 15:43:44 UTC
Description of problem:
uid_wrapper does not work well with address sanitizer.
(similar case was already solved in nss_wrapper)  

Version-Release number of selected component (if applicable):
sh$ rpm -q uid_wrapper
uid_wrapper-1.2.4-3.fc29.x86_64

How reproducible:
Deterministic

Steps to Reproduce:
1. useradd test
2. dnf install -y uid_wrapper libasan -e0 -d0
3. su - test
4. id -u
5. LD_PRELOAD="/usr/lib64/libasan.so.5:/usr/lib64/libuid_wrapper.so.0" UID_WRAPPER=1 UID_WRAPPER_ROOT=1 id -u

Actual results:
[root@0de714eea153 /]# useradd test
[root@0de714eea153 /]# dnf install -y uid_wrapper libasan -e0 -d0
[root@0de714eea153 /]# su - test
[test@0de714eea153 ~]$ id -u
1000
[test@0de714eea153 ~]$ LD_PRELOAD="/usr/lib64/libasan.so.5:/usr/lib64/libuid_wrapper.so.0" UID_WRAPPER=1 UID_WRAPPER_ROOT=1 id -u
==83==You are trying to dlopen a libc.so.10 shared library with RTLD_DEEPBIND flag which is incompatibe with sanitizer runtime (see https://github.com/google/sanitizers/issues/611 for details). If you want to run libc.so.10 library under sanitizers please remove RTLD_DEEPBIND from dlopen flags.

Expected results:
[root@0de714eea153 /]# useradd test
[root@0de714eea153 /]# dnf install -y uid_wrapper libasan -e0 -d0
[root@0de714eea153 /]# su - test
[test@0de714eea153 ~]$ id -u
1000
[test@0de714eea153 ~]$ LD_PRELOAD="/usr/lib64/libasan.so.5:/usr/lib64/libuid_wrapper.so.0" UID_WRAPPER=1 UID_WRAPPER_ROOT=1 id -u
UID_WRAPPER_ROOT=1 id -u
0

Comment 1 Andreas Schneider 2019-03-18 20:03:57 UTC
I know, I just need to find time to clean up uid_wrapper and that's the problem.


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