summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-04-01 16:12:29 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-04-06 14:33:43 -0400
commit55a0f220ba8b35d7ea8e47ad19babdb05dd2bbe9 (patch)
tree0ad879883ea70686ca9a3caf012b29413b3315a5 /src/db
parent3bd250d73e7d77cf8ceb72133ce13059c52a70ed (diff)
downloadsssd-55a0f220ba8b35d7ea8e47ad19babdb05dd2bbe9.tar.gz
sssd-55a0f220ba8b35d7ea8e47ad19babdb05dd2bbe9.tar.xz
sssd-55a0f220ba8b35d7ea8e47ad19babdb05dd2bbe9.zip
Protect against check-and-open race conditions
There is a small window between running lstat() on a filename and opening it where it's possible for the file to have been modified. We were protecting against this by saving the stat data from the original file and verifying that it was the same file (by device and inode) when we opened it again, but this is an imperfect solution, as it is still possible for an attacker to modify the permissions during this window. It is much better to simply open the file and test on the active file descriptor. Resolves https://fedorahosted.org/sssd/ticket/425 incidentally, as without the initial lstat, we are implicitly accepting symlinks and only verifying the target file.
Diffstat (limited to 'src/db')
0 files changed, 0 insertions, 0 deletions