Re: disabled SSL log_like tests
От | Tom Lane |
---|---|
Тема | Re: disabled SSL log_like tests |
Дата | |
Msg-id | 1120735.1745350422@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: disabled SSL log_like tests (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: disabled SSL log_like tests
|
Список | pgsql-hackers |
I wrote: > The fact that mamba hasn't been failing on the other affected > tests is a bit puzzling. mamba isn't running kerberos or ldap > or oauth_validator, so the lack of failures there is expected. > authentication/t/001_password.pl appears accidentally not vulnerable: > it's not using log_like in any connect_fails tests. (It is using > log_unlike, so those tests could be giving silent false negatives.) > But authentication/t/003_peer.pl has 8 test cases that look > vulnerable. I guess there must be some extra dollop of timing > weirdness in the ssl tests that's not there in 003_peer.pl. After pushing this patch, the probable explanation for the "extra timing weirdness" finally penetrated my brain: the error reports we are looking for are cases that are detected by OpenSSL. So it's plausible that OpenSSL has told the connecting client to go away before it returns the error indication to the backend's calling code, which would be what would log the message. That is what provides the window for a race condition. You still need a bunch of assumptions about the kernel's subsequent scheduling of psql and the TAP script versus the backend, but the whole thing is certainly dependent on psql getting the word sooner than the backend. (Not all of the tests disabled by 55828a6b6 meet this description, but a bunch of them do, and I believe that I just zapped every log_like condition in the script rather than trying to be selective about which ones were known to have failed.) It seems at least plausible that the Kerberos tests could have a similar problem. I'm less sure about LDAP or OAuth. But authentication/t/003_peer.pl would not, because elog.c emits errors to the log before sending them to the client. So that explains the lack of buildfarm reports from mamba, and it's unclear that we have any other animals with the right timing behavior to see this. regards, tom lane
В списке pgsql-hackers по дате отправления: