| author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2011-10-17 20:26:12 (GMT) |
|---|---|---|
| committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2011-10-18 13:58:00 (GMT) |
| commit | 6ba44b91e37622ef8c146d8f2ac92d708a18ed34 (patch) (side-by-side diff) | |
| tree | b812fb2c936377681b2bb7950f3f7d89c08f3190 | |
| parent | fb84be47db7cdaff406792c08e34670e8e0cbda9 (diff) | |
| download | xserver-6ba44b91e37622ef8c146d8f2ac92d708a18ed34.zip xserver-6ba44b91e37622ef8c146d8f2ac92d708a18ed34.tar.gz | |
Fix CVE-2011-4028: File disclosure vulnerability.
use O_NOFOLLOW to open the existing lock file, so symbolic links
aren't followed, thus avoid revealing if it point to an existing
file.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
| -rw-r--r-- | os/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -318,7 +318,7 @@ LockServer(void) /* * Read the pid from the existing file */ - lfd = open(LockFile, O_RDONLY); + lfd = open(LockFile, O_RDONLY|O_NOFOLLOW); if (lfd < 0) { unlink(tmp); FatalError("Can't read lock file %s\n", LockFile); |
