Bug 17145

Summary: syslog with LOG_CONS leaks console file descriptor
Product: glibc Reporter: Rich Felker <bugdal>
Component: libcAssignee: Adhemerval Zanella <adhemerval.zanella>
Severity: normal CC: adhemerval.zanella, drepper.fsp, fweimer
Priority: P2 Flags: fweimer: security?
Version: unspecified   
Target Milestone: 2.34   
Host: Target:
Build: Last reconfirmed:

Description Rich Felker 2014-07-12 01:36:21 UTC
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.
Comment 1 Adhemerval Zanella 2021-04-15 14:59:39 UTC
Fixed on 2.34.