pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pgcrypto: Fix check for buffer size
6+ messages / 1 participants
[nested] [flat]

* pgsql: pgcrypto: Fix check for buffer size
@ 2024-01-30 10:26 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2024-01-30 10:26 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pgcrypto: Fix check for buffer size

The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b527ebc1d37aa82b771dc9c76111bed1bce35a05

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: pgcrypto: Fix check for buffer size
@ 2024-01-30 10:27 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2024-01-30 10:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pgcrypto: Fix check for buffer size

The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5d726c72cd0f6b13842896058151bac5f68b4100

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: pgcrypto: Fix check for buffer size
@ 2024-01-30 10:27 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2024-01-30 10:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pgcrypto: Fix check for buffer size

The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f74b5c5bc67c3c1df799e5dd073a441984953b44

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: pgcrypto: Fix check for buffer size
@ 2024-01-30 10:28 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2024-01-30 10:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pgcrypto: Fix check for buffer size

The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/54717fcaad759312b2ff8588e146977f529e7798

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: pgcrypto: Fix check for buffer size
@ 2024-01-30 10:28 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2024-01-30 10:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pgcrypto: Fix check for buffer size

The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/375d30bcbbd07eb82144533fd4a30640af680e81

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: pgcrypto: Fix check for buffer size
@ 2024-01-30 10:28 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2024-01-30 10:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pgcrypto: Fix check for buffer size

The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c29022164f8a25d7b22763374c10a0c8311abcff

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2024-01-30 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 10:26 pgsql: pgcrypto: Fix check for buffer size Daniel Gustafsson <dgustafsson@postgresql.org>
2024-01-30 10:27 pgsql: pgcrypto: Fix check for buffer size Daniel Gustafsson <dgustafsson@postgresql.org>
2024-01-30 10:27 pgsql: pgcrypto: Fix check for buffer size Daniel Gustafsson <dgustafsson@postgresql.org>
2024-01-30 10:28 pgsql: pgcrypto: Fix check for buffer size Daniel Gustafsson <dgustafsson@postgresql.org>
2024-01-30 10:28 pgsql: pgcrypto: Fix check for buffer size Daniel Gustafsson <dgustafsson@postgresql.org>
2024-01-30 10:28 pgsql: pgcrypto: Fix check for buffer size Daniel Gustafsson <dgustafsson@postgresql.org>

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