-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authfile Leaking File Descriptor #136
Comments
Thanks! |
Thanks @klali! What would be the expected date of the next release for this to be included? |
Unknown at this time, we just made a release and given the overhead I'd like to collect a few more fixes before spending the time to make another. |
This was introduced with d9780ea, which first appeared in 2.18. Beforehand the file handle was correctly closed in pam_yubico.c |
CVE-2018-9275 has been assigned to this. |
This opens any file descriptors with the O_CLOEXEC flag, which will make sure that file descriptors won't be leaked into any child process. This was previously an issue due to a forgotten fclose() (Yubico#136).
This uses mkotemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This opens any file descriptors with the O_CLOEXEC flag, which will make sure that file descriptors won't be leaked into any child process. This was previously an issue due to a forgotten fclose() (Yubico#136).
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This opens any file descriptors with the O_CLOEXEC flag, which will make sure that file descriptors won't be leaked into any child process. This was previously an issue due to a forgotten fclose() (Yubico#136).
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
This opens any file descriptors with the O_CLOEXEC flag, which will make sure that file descriptors won't be leaked into any child process. This was previously an issue due to a forgotten fclose() (Yubico#136).
This opens any file descriptors with the O_CLOEXEC flag, which will make sure that file descriptors won't be leaked into any child process. This was previously an issue due to a forgotten fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
This opens any file descriptors with the O_CLOEXEC flag, which will make sure that file descriptors won't be leaked into any child process. This was previously an issue due to a forgotten fclose() (Yubico#136).
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is used. This makes sure that the file descriptor is being closed and not leaked into child processes. This was an issues previously due to a missing fclose() (Yubico#136).
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag, which makes sure that the file descriptor is closed and won't be leaked into any child process, which was previously an issue due to a missing fclose() (Yubico#136).
…g fopen() A previous commit (d51124e) added the `e` flag to the `fopen()` calls. However this flag is not supported on all platforms (MacOS) and will be silently dropped (see Yubico#145). This patch works around those issues by manually opening the file descriptor using `open()` with the `O_CLOEXEC` flag, and invoking `fd_open()` on the resulting file descriptor to open an appropriate `FILE` stream. This makes sure that all files used by pam_yubico will be opened with the `O_CLOEXEC` flag on all supported platforms to mitigate issues with missing `fclose()` invocation (see Yubico#136).
…g fopen() A previous commit (d51124e) added the `e` flag to the `fopen()` calls. However this flag is not supported on all platforms (MacOS) and will be silently dropped (see Yubico#145). This patch works around those issues by manually opening the file descriptor using `open()` with the `O_CLOEXEC` flag, and invoking `fd_open()` on the resulting file descriptor to open an appropriate `FILE` stream. This makes sure that all files used by pam_yubico will be opened with the `O_CLOEXEC` flag on all supported platforms to mitigate issues with missing `fclose()` invocation (see Yubico#136).
When the authfile is successfully opened, the file descriptor is not closed and leaks file descriptors. The file descriptor should be closed after this line; https://github.com/Yubico/yubico-pam/blob/master/util.c#L177
The text was updated successfully, but these errors were encountered: