Another signal handler related bug
Another signal handler related bug
Posted Jul 10, 2024 18:24 UTC (Wed) by make (subscriber, #62794)In reply to: Another signal handler related bug by rweikusat2
Parent article: Another OpenSSH remote code execution vulnerability
OK, I was confused by the two sigprocmask() calls which made no sense. If that's the whole main loop, there is indeed no race condition, because there is no race - not because the code is flawless.
> realtime signals for I/O readiness notification is a somewhat older way than epoll
I've never used that, that's why I asked: what's the point? I was wondering if I should learn about this or whether this is just obsolete stuff, and I should keep avoiding signals whenever possible.
Posted Jul 10, 2024 18:33 UTC (Wed)
by rweikusat2 (subscriber, #117920)
[Link]
The code is correct with or without the superfluous sigprocmask calls in the loop as it doesn't rely on pause being interrupted. That's just something which may happen and the whole purpose of the loop is to work around that. Anything actually productive only happens because this or that signal handler got invoked by the kernel.
Another signal handler related bug
>OK, I was confused by the two sigprocmask() calls which made no sense. If that's the whole main loop, there is
> indeed no race condition, because there is no race - not because the code is flawless.