Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #2884
Closed
Open
Issue created Mar 16, 2018 by Administrator@rootContributor

minor security issue: file descriptor leakage

Created by: vanhauser-thc

drrun is leaking a file descriptor to the run program:

bin64/drrun -c /prg/tmp/dynamorio/build/api/bin/libbbsize.so -- /bin/sleep 120 Client bbsize is running

/proc # ps auxw | grep sleep
root     18771  0.2  0.0 284756  3588 pts/0    S+   02:24   0:00 /bin/sleep 120
root     18773  0.0  0.0  11284   932 pts/1    S+   02:24   0:00 grep --color=auto sleep
nas /proc # cd 18771/fd
nas /proc/18771/fd # ls -al
total 0
dr-x------ 2 root root  0 Mar 16 02:24 .
dr-xr-xr-x 9 root root  0 Mar 16 02:24 ..
lrwx------ 1 root root 64 Mar 16 02:24 0 -> /dev/pts/0
lrwx------ 1 root root 64 Mar 16 02:24 1 -> /dev/pts/0
lrwx------ 1 root root 64 Mar 16 02:24 2 -> /dev/pts/0
lr-x------ 1 root root 64 Mar 16 02:24 3 -> /bin/sleep

a program could check if fd 3 is pointing to itself and then perform different functionality, e.g. in some malware analysis example.

open() should be performed with O_CLOEXEC or the fd get the flag set via fcntl.

Assignee
Assign to
Time tracking