Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 198661 Details for
Bug 233481
SELinux audit messages "/bin/umount (mount_t) "read write" to socket:[NNN] (automount_t)"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Don't leak any file descriptors on exec()
autofs-5.0.1-dont-leak-fds-on-exec.patch (text/plain), 1.33 KB, created by
Jeff Moyer
on 2007-09-18 18:14:46 UTC
(
hide
)
Description:
Don't leak any file descriptors on exec()
Filename:
MIME Type:
Creator:
Jeff Moyer
Created:
2007-09-18 18:14:46 UTC
Size:
1.33 KB
patch
obsolete
>--- autofs-5.0.1/daemon/spawn.c.fd-leak 2007-09-18 12:20:33.000000000 -0400 >+++ autofs-5.0.1/daemon/spawn.c 2007-09-18 14:07:32.000000000 -0400 >@@ -89,7 +89,7 @@ void reset_signals(void) > static int do_spawn(logger *log, unsigned int options, const char *prog, const char *const *argv) > { > pid_t f; >- int ret, status, pipefd[2]; >+ int ret, status, pipefd[2], fd; > char errbuf[ERRBUFSIZ + 1], *p, *sp; > int errp, errn; > int cancel_state; >@@ -158,6 +158,24 @@ static int do_spawn(logger *log, unsigne > setpgid(0, pgrp); > } > >+ /* >+ * The daemon is multi-threaded, and thus we can end >+ * up in a situation where another lookup is happening >+ * while this code runs. What this means is that the >+ * other lookup could end up opening up file >+ * descriptors (sockets and the like) in order to do >+ * DNS requests, LDAP connections, or NIS lookups. If >+ * we are lucky enough, then we call exec() with these >+ * file descriptors open (and FD_CLOEXEC not set) so >+ * we leak them to the exec'd process. The most >+ * pragmatic way around this, given the current >+ * structure of the code, is to close all file >+ * descriptors above 2 (since we've dup'd >+ * stdin,out,err to 0, 1, 2). >+ */ >+ for (fd = 3; fd < 1024; fd++) >+ close(fd); >+ > execv(prog, (char *const *) argv); > _exit(255); /* execv() failed */ > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233481
: 198661 |
275541