pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the bac 2+ messages / 1 participants [nested] [flat]
* pgsql: Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the bac @ 2023-11-27 23:36 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2023-11-27 23:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend scram_SaltedPassword() could take a long time to compute when the number of iterations used is large enough, and this code uses a tight loop to compute a salted password. Note that the same issue exists in libpq when using \password and a large iteration number, but this cannot be interrupted. A CFI in the backend is useful for server-side computations, at least. Backpatch down to 16, where the user-settable GUC scram_iterations has been added. Author: Bowen Shi Reviewed-by: Aleksander Alekseev, Daniel Gustafsson Discussion: https://postgr.es/m/CAM_vCueV6xfr08KczfaCEk5J_qeTZtgqN7+orkNLx=g+phE82Q@mail.gmail.com Backpatch-through: 16 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/07cb7bc1c7a88299e6bce281320397f07ca045c2 Modified Files -------------- src/common/scram-common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the bac @ 2023-11-27 23:36 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2023-11-27 23:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend scram_SaltedPassword() could take a long time to compute when the number of iterations used is large enough, and this code uses a tight loop to compute a salted password. Note that the same issue exists in libpq when using \password and a large iteration number, but this cannot be interrupted. A CFI in the backend is useful for server-side computations, at least. Backpatch down to 16, where the user-settable GUC scram_iterations has been added. Author: Bowen Shi Reviewed-by: Aleksander Alekseev, Daniel Gustafsson Discussion: https://postgr.es/m/CAM_vCueV6xfr08KczfaCEk5J_qeTZtgqN7+orkNLx=g+phE82Q@mail.gmail.com Backpatch-through: 16 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/14f2f9eb1a15f234f1ef417b8e62a6b7f950be4d Modified Files -------------- src/common/scram-common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-11-27 23:36 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-11-27 23:36 pgsql: Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the bac Michael Paquier <michael@paquier.xyz> 2023-11-27 23:36 pgsql: Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the bac Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox