pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Improve pglz_decompress's defenses against corrupt compressed da 5+ messages / 1 participants [nested] [flat]
* pgsql: Improve pglz_decompress's defenses against corrupt compressed da @ 2023-10-19 00:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2023-10-19 00:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve pglz_decompress's defenses against corrupt compressed data. When processing a match tag, check to see if the claimed "off" is more than the distance back to the output buffer start. If it is, then the data is corrupt, and what's more we would fetch from outside the buffer boundaries and potentially incur a SIGSEGV. (Although the odds of that seem relatively low, given that "off" can't be more than 4K.) Back-patch to v13; before that, this function wasn't really trying to protect against bad data. Report and fix by Flavien Guedez. Discussion: https://postgr.es/m/01fc0593-e31e-463d-902c-dd43174acee2@oopacity.net Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9b103f861ea9d74c4c43e80c5c5dfcdc1e61f4a2 Modified Files -------------- src/common/pg_lzcompress.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Improve pglz_decompress's defenses against corrupt compressed da @ 2023-10-19 00:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2023-10-19 00:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve pglz_decompress's defenses against corrupt compressed data. When processing a match tag, check to see if the claimed "off" is more than the distance back to the output buffer start. If it is, then the data is corrupt, and what's more we would fetch from outside the buffer boundaries and potentially incur a SIGSEGV. (Although the odds of that seem relatively low, given that "off" can't be more than 4K.) Back-patch to v13; before that, this function wasn't really trying to protect against bad data. Report and fix by Flavien Guedez. Discussion: https://postgr.es/m/01fc0593-e31e-463d-902c-dd43174acee2@oopacity.net Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cfa4eba02c878d69e7f2c7bf8895a393521bc013 Modified Files -------------- src/common/pg_lzcompress.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Improve pglz_decompress's defenses against corrupt compressed da @ 2023-10-19 00:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2023-10-19 00:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve pglz_decompress's defenses against corrupt compressed data. When processing a match tag, check to see if the claimed "off" is more than the distance back to the output buffer start. If it is, then the data is corrupt, and what's more we would fetch from outside the buffer boundaries and potentially incur a SIGSEGV. (Although the odds of that seem relatively low, given that "off" can't be more than 4K.) Back-patch to v13; before that, this function wasn't really trying to protect against bad data. Report and fix by Flavien Guedez. Discussion: https://postgr.es/m/01fc0593-e31e-463d-902c-dd43174acee2@oopacity.net Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/985ac5ce292ab084fe56b90528df6a2496f2c507 Modified Files -------------- src/common/pg_lzcompress.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Improve pglz_decompress's defenses against corrupt compressed da @ 2023-10-19 00:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2023-10-19 00:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve pglz_decompress's defenses against corrupt compressed data. When processing a match tag, check to see if the claimed "off" is more than the distance back to the output buffer start. If it is, then the data is corrupt, and what's more we would fetch from outside the buffer boundaries and potentially incur a SIGSEGV. (Although the odds of that seem relatively low, given that "off" can't be more than 4K.) Back-patch to v13; before that, this function wasn't really trying to protect against bad data. Report and fix by Flavien Guedez. Discussion: https://postgr.es/m/01fc0593-e31e-463d-902c-dd43174acee2@oopacity.net Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2c63dc0356b3573382821bb67c869e95646b6f6d Modified Files -------------- src/common/pg_lzcompress.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Improve pglz_decompress's defenses against corrupt compressed da @ 2023-10-19 00:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2023-10-19 00:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve pglz_decompress's defenses against corrupt compressed data. When processing a match tag, check to see if the claimed "off" is more than the distance back to the output buffer start. If it is, then the data is corrupt, and what's more we would fetch from outside the buffer boundaries and potentially incur a SIGSEGV. (Although the odds of that seem relatively low, given that "off" can't be more than 4K.) Back-patch to v13; before that, this function wasn't really trying to protect against bad data. Report and fix by Flavien Guedez. Discussion: https://postgr.es/m/01fc0593-e31e-463d-902c-dd43174acee2@oopacity.net Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/817669ea27c4ecc4240adc88a12ddaed51997b00 Modified Files -------------- src/common/pg_lzcompress.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2023-10-19 00:43 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-10-19 00:43 pgsql: Improve pglz_decompress's defenses against corrupt compressed da Tom Lane <tgl@sss.pgh.pa.us> 2023-10-19 00:43 pgsql: Improve pglz_decompress's defenses against corrupt compressed da Tom Lane <tgl@sss.pgh.pa.us> 2023-10-19 00:43 pgsql: Improve pglz_decompress's defenses against corrupt compressed da Tom Lane <tgl@sss.pgh.pa.us> 2023-10-19 00:43 pgsql: Improve pglz_decompress's defenses against corrupt compressed da Tom Lane <tgl@sss.pgh.pa.us> 2023-10-19 00:43 pgsql: Improve pglz_decompress's defenses against corrupt compressed da Tom Lane <tgl@sss.pgh.pa.us>
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