summaryrefslogtreecommitdiff
path: root/src/signal/sigqueue.c
AgeCommit message (Collapse)AuthorLines
2011-07-30fix race condition in sigqueueRich Felker-2/+8
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.
2011-03-20global cleanup to use the new syscall interfaceRich Felker-1/+1
2011-03-10fix errors in sigqueue (potential information leak, wrong behavior)Rich Felker-5/+7
1. any padding in the siginfo struct was not necessarily zero-filled, so it might have contained private data off the caller's stack. 2. the uid and pid must be filled in from userspace. the previous rsyscall fix broke rsyscalls because the values were always incorrect.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+14