pgsql: Guard against rare RAND_bytes() failures in pg_strong_random().
В списке pgsql-committers по дате отправления:
| От | Dean Rasheed |
|---|---|
| Тема | pgsql: Guard against rare RAND_bytes() failures in pg_strong_random(). |
| Дата | |
| Msg-id | E1fgQWZ-0004jo-6V@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Guard against rare RAND_bytes() failures in pg_strong_random(). When built using OpenSSL, pg_strong_random() uses RAND_bytes() to generate the random number. On very rare occasions that can fail, if its PRNG has not been seeded with enough data. Additionally, once it does fail, all subsequent calls will also fail until more seed data is added. Since this is required during backend startup, this can result in all new backends failing to start until a postmaster restart. Guard against that by checking the state of OpenSSL's PRNG using RAND_status(), and if necessary (very rarely), seeding it using RAND_poll(). Back-patch to v10, where pg_strong_random() was introduced. Dean Rasheed and Michael Paquier. Discussion: https://postgr.es/m/CAEZATCXMtxbzSAvyKKk5uCRf9pNt4UV%2BF_5v%3DgLfJUuPxU4Ytg%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8f6ce7fb090a674f18b72e89a2b868fe1343fe8f Modified Files -------------- src/port/pg_strong_random.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера