diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-07-30 21:11:31 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-07-30 21:11:31 -0400 |
commit | 07827d1a82fb33262f686eda959857f0d28cd8fa (patch) | |
tree | 4a18e6e1ab1e9a96e23daaefd387d724556597e1 /src/fcntl | |
parent | ad5881842eaa6a04fcb35b822b0a046a3f7e73a2 (diff) | |
download | musl-07827d1a82fb33262f686eda959857f0d28cd8fa.tar.gz musl-07827d1a82fb33262f686eda959857f0d28cd8fa.tar.xz musl-07827d1a82fb33262f686eda959857f0d28cd8fa.zip |
fix race condition in sigqueue
this race is fundamentally due to linux's bogus requirement that userspace, rather than kernelspace, fill in the siginfo structure. an intervening signal handler that calls fork could cause both the parent and child process to send signals claiming to be from the parent, which could in turn have harmful effects depending on what the recipient does with the signal. we simply block all signals for the interval between getuid and sigqueue syscalls (much like what raise() does already) to prevent the race and make the getuid/sigqueue pair atomic. this will be a non-issue if linux is fixed to validate the siginfo structure or fill it in from kernelspace.
Diffstat (limited to 'src/fcntl')
0 files changed, 0 insertions, 0 deletions