Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump postgres pgjdbc driver to 42.5.0 (fix CVE-2022-31197) #6206

Closed
wants to merge 2 commits into from

Conversation

schlosna
Copy link
Contributor

General

Before this PR:
Atlas includes Postgres pgjdbc driver with CVE-2022-31197:

After this PR:
==COMMIT_MSG==
Bump postgres pgjdbc driver to 42.5.0
==COMMIT_MSG==

Priority: P0

Concerns / possible downsides (what feedback would you like?):

Is documentation needed?:

Compatibility

Does this PR create any API breaks (e.g. at the Java or HTTP layers) - if so, do we have compatibility?:

Does this PR change the persisted format of any data - if so, do we have forward and backward compatibility?:

The code in this PR may be part of a blue-green deploy. Can upgrades from previous versions safely coexist? (Consider restarts of blue or green nodes.):

Does this PR rely on statements being true about other products at a deployment - if so, do we have correct product dependencies on these products (or other ways of verifying that these statements are true)?:

Does this PR need a schema migration?

Testing and Correctness

What, if any, assumptions are made about the current state of the world? If they change over time, how will we find out?:

What was existing testing like? What have you done to improve it?:

If this PR contains complex concurrent or asynchronous code, is it correct? The onus is on the PR writer to demonstrate this.:

If this PR involves acquiring locks or other shared resources, how do we ensure that these are always released?:

Execution

How would I tell this PR works in production? (Metrics, logs, etc.):

Has the safety of all log arguments been decided correctly?:

Will this change significantly affect our spending on metrics or logs?:

How would I tell that this PR does not work in production? (monitors, etc.):

If this PR does not work as expected, how do I fix that state? Would rollback be straightforward?:

If the above plan is more complex than “recall and rollback”, please tag the support PoC here (if it is the end of the week, tag both the current and next PoC):

Scale

Would this PR be expected to pose a risk at scale? Think of the shopping product at our largest stack.:

Would this PR be expected to perform a large number of database calls, and/or expensive database calls (e.g., row range scans, concurrent CAS)?:

Would this PR ever, with time and scale, become the wrong thing to do - and if so, how would we know that we need to do something differently?:

Development Process

Where should we start reviewing?:

If this PR is in excess of 500 lines excluding versions lock-files, why does it not make sense to split it?:

Please tag any other people who should be aware of this PR:
@jeremyk-91
@sverma30
@raiju

@changelog-app
Copy link

changelog-app bot commented Aug 30, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Bump postgres pgjdbc driver to 42.5.0

Check the box to generate changelog(s)

  • Generate changelog entry

@@ -88,7 +88,7 @@ uk.org.lidalia:slf4j-test = 1.1.0
com.datastax.cassandra:cassandra-driver-core = 3.8.0
com.oracle.database.jdbc:ojdbc11 = 21.5.0.0
com.palantir.cassandra:* = 2.2.13-1.6.0
org.postgresql:postgresql = 42.3.3
org.postgresql:postgresql = 42.5.0
Copy link
Contributor Author

@schlosna schlosna Aug 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could bump to 42.4.1 or 42.4.2 if we don't want 42.5.0

From https://jdbc.postgresql.org/documentation/changelog.html#version_42.5.0

Version 42.5.0 (2022-08-24)

Notable changes

Changed

Version 42.4.2 (2022-08-17)

Notable changes

Changed

Added

  • fix: make setObject accept UUID array PR #2587

Fixed

  • fix: regression with GSS. Changes introduced to support building with Java 17 caused failures Issue #2588
  • fix: set a timeout to get the return from requesting SSL upgrade. PR #2572
  • feat: synchronize statement executions (e.g. avoid deadlock when Connection.isValid is executed from concurrent threads)

Version 42.4.1 (2022-08-03)

Notable changes

Security

  • fix: CVE-2022-31197 Fixes SQL generated in PgResultSet.refresh() to escape column identifiers so as to prevent SQL injection.
    Previously, the column names for both key and data columns in the table were copied as-is into the generated SQL. This allowed a malicious table with column names that include statement terminator to be parsed and executed as multiple separate commands.
    Also adds a new test class ResultSetRefreshTest to verify this change.
    Reported by Sho Kato

Changed

  • chore: skip publishing pgjdbc-osgi-test to Central
  • chore: bump Gradle to 7.5
  • test: update JUnit to 5.8.2

Added

  • chore: added Gradle Wrapper Validation for verifying gradle-wrapper.jar
  • chore: added "permissions: contents: read" for GitHub Actions to avoid unintentional modifications by the CI
  • chore: support building pgjdbc with Java 17

Version 42.4.0 (2022-06-09)

Notable changes

Changed

Fixed

Version 42.3.6 (2022-05-24)

Notable changes

Fixed

  • fix: close refcursors when underlying cursor==null instead of relying on defaultRowFetchSize PR sweep faster #2377

Version 42.3.5 (2022-05-04)

Notable changes

Known issues

  • Regression since 42.3.2: "cursor does not exist" when using ResultSet.setFetchSize from CallableStatement, fixed in 42.3.6 (see PG sweep faster #2377)

Changed

  • test: polish TimestampUtilsTest
  • chore: use GitHub Action concurrency feature to terminate CI jobs on fast PR pushes

Added

  • Added KEYS file to allow for verifying artifacts PR 2499

Fixed

  • perf: enable tcpNoDelay by default PR 2495. This is a regression from 42.2.x versions where tcpNoDelay defaulted to true
  • docs: fix readme.md after PR 2495 PR 2496
  • feat: targetServerType=preferPrimary connection parameter PR 2483
  • fix: revert removal of toOffsetDateTime(String timestamp) fixes Issue DbKvs sweep refactors to address last PR comments #2497 PR 2501

Version 42.3.4 (2022-04-15)

Notable changes

Known issues

  • Regression since 42.3.2: "cursor does not exist" when using ResultSet.setFetchSize from CallableStatement, fixed in 42.3.6 (see PG sweep faster #2377)

Changed

Fixed

  • docs: Update testing documentation PR 2446
  • fix: Throw an exception if the driver cannot parse the URL instead of returning NULL fixes Issue More hints for getRange() on Oracle #2421 PR 2441
  • fix: Use PGProperty instead of the property names directly PR 2444
  • docs: update changelog, missing links at bottom and formatting PR 2460
  • fix: Remove isDeprecated from PGProperty. It was originally intended to help produce automated docs. Fixes #Issue 2479 PR 2480
  • fix: change PGInterval parseISO8601Format to support fractional second PR 2457
  • fix: More test and fix for issues discovered by PR Feature/serialisable tm initialise check #2476 PR 0.60 release notes #2488

@schlosna
Copy link
Contributor Author

Closing in favor of #6205

@schlosna schlosna closed this Aug 31, 2022
@schlosna schlosna deleted the ds/postgres branch August 31, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants