Skip to content
Snippets Groups Projects
Commit 6ba44b91 authored by Matthieu Herrb's avatar Matthieu Herrb
Browse files

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: default avatarMatthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent fb84be47
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment