Bug 17145 - syslog with LOG_CONS leaks console file descriptor
Summary: syslog with LOG_CONS leaks console file descriptor
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-12 01:36 IST by Rich Felker
Modified: 2015-02-18 14:29 IST (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Felker 2014-07-12 01:36:21 IST
When LOG_CONS is enabled and sending to the logging facility fails, syslog() opens /dev/console without the O_CLOEXEC flag. Thus a file descriptor to the console can leak to child processes in multithreaded programs or programs which fork and exec from signal handlers.