Skip to content

File lock for write on /data/traffic_limiter.php#61

Merged
sebsauvage merged 1 commit into
sebsauvage:masterfrom
jelhan:master
Feb 3, 2014
Merged

File lock for write on /data/traffic_limiter.php#61
sebsauvage merged 1 commit into
sebsauvage:masterfrom
jelhan:master

Conversation

@jelhan
Copy link
Copy Markdown

@jelhan jelhan commented Sep 28, 2013

Adding an LOCK_EX for write on file /data/traffic_limiter.php for preventing that one instance is reading data while a write by another instance is not finished.

@defuse
Copy link
Copy Markdown

defuse commented Feb 2, 2014

If we assume that without a lock, multiple simultaneous writes can corrupt a file, or simultaneous reads and writes can corrupt what is read, then it might be possible to turn the lack-of-lock into a remote code execution vulnerability, since the file is executed as PHP code.

sebsauvage added a commit that referenced this pull request Feb 3, 2014
File lock for write on /data/traffic_limiter.php
@sebsauvage sebsauvage merged commit 09d39a9 into sebsauvage:master Feb 3, 2014
@sebsauvage
Copy link
Copy Markdown
Owner

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants