pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
@ 2015-01-30 18:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-01-30 18:05 UTC (permalink / raw)
  To: pgsql-committers

Fix Coverity warning about contrib/pgcrypto's mdc_finish().

Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a59ee881978a2027dced30053f8ad4cd8e143953

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c |   49 ++++++++++++++++------------------------
1 file changed, 19 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
@ 2015-01-30 18:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-01-30 18:05 UTC (permalink / raw)
  To: pgsql-committers

Fix Coverity warning about contrib/pgcrypto's mdc_finish().

Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/70da7aeba1f845d2f0bb864031e0bea21b384ca7

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c |   49 ++++++++++++++++------------------------
1 file changed, 19 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
@ 2015-01-30 18:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-01-30 18:05 UTC (permalink / raw)
  To: pgsql-committers

Fix Coverity warning about contrib/pgcrypto's mdc_finish().

Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f08cf8ad9098bd26a57fabc5ecbfd7d38e6c2cee

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c |   49 ++++++++++++++++------------------------
1 file changed, 19 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
@ 2015-01-30 18:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-01-30 18:05 UTC (permalink / raw)
  To: pgsql-committers

Fix Coverity warning about contrib/pgcrypto's mdc_finish().

Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/a97dfdfd9043449e67aeefe8248891b43b37eed8

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c |   49 ++++++++++++++++------------------------
1 file changed, 19 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
@ 2015-01-30 18:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-01-30 18:05 UTC (permalink / raw)
  To: pgsql-committers

Fix Coverity warning about contrib/pgcrypto's mdc_finish().

Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8f51c432cd6cc21f36e9dd9b15695869e73cd0d0

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c |   49 ++++++++++++++++------------------------
1 file changed, 19 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
@ 2015-01-30 18:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-01-30 18:05 UTC (permalink / raw)
  To: pgsql-committers

Fix Coverity warning about contrib/pgcrypto's mdc_finish().

Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7c41a32b3ffcabfa0082e21e51ebefe9badb1d27

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c |   49 ++++++++++++++++------------------------
1 file changed, 19 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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


end of thread, other threads:[~2015-01-30 18:05 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 18:05 pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). Tom Lane <tgl@sss.pgh.pa.us>
2015-01-30 18:05 pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). Tom Lane <tgl@sss.pgh.pa.us>
2015-01-30 18:05 pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). Tom Lane <tgl@sss.pgh.pa.us>
2015-01-30 18:05 pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). Tom Lane <tgl@sss.pgh.pa.us>
2015-01-30 18:05 pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). Tom Lane <tgl@sss.pgh.pa.us>
2015-01-30 18:05 pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). 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