>This fixes stack smashing I've seen in Okteta.
>
>The problem is that fd_set by default uses limit (FD_SETSIZE) of 1024,
>unless FD_SETSIZE is set before including the <sys/select.h> header.
>The Qt4 source code contains some checks, but backtrace from GDB tells
>they're not enough. Instead of spending time on looking what's missed,
>I've just replaced select(2) with poll(2). Given that code actually
>shrunk, and I see no crashes anymore, I think it should go in.
>
>I suppose this could be a security issue, as you could somehow trigger
>stack smashing, but I can't see anything harder than local DoS for now.
>But this could be different for some Qt-based apps. There are more
>select(2) calls which I'm willing to tweak before, though. This patch
>just fixes a problem I faced.
>
>Remember that Qt4 is EOL, so we don't have to bother about pushing
>those patches upstream. On the other side, Qt5 wants same treatment.
>Not sure that all platforms Qt5 runs on support poll(2) correctly,
>though.

Shocking.

(I have been talking about fd_set overflows for almost 15 years, and a
few people helped me fix our entire base tree around that time)

Reply via email to