pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Convert newlines to spaces in names written in pg_dump comments.
12+ messages / 2 participants
[nested] [flat]

* pgsql: Convert newlines to spaces in names written in pg_dump comments.
@ 2012-02-23 23:04  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 12+ messages in thread

From: Tom Lane @ 2012-02-23 23:04 UTC (permalink / raw)
  To: pgsql-committers

Convert newlines to spaces in names written in pg_dump comments.

pg_dump was incautious about sanitizing object names that are emitted
within SQL comments in its output script.  A name containing a newline
would at least render the script syntactically incorrect.  Maliciously
crafted object names could present a SQL injection risk when the script
is reloaded.

Reported by Heikki Linnakangas, patch by Robert Haas

Security: CVE-2012-0868

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/89e0bac86dbca40dfc321926205f2a90d3da5437

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c |   60 +++++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 4 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in pg_dump comments.
@ 2012-02-23 23:04  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 12+ messages in thread

From: Tom Lane @ 2012-02-23 23:04 UTC (permalink / raw)
  To: pgsql-committers

Convert newlines to spaces in names written in pg_dump comments.

pg_dump was incautious about sanitizing object names that are emitted
within SQL comments in its output script.  A name containing a newline
would at least render the script syntactically incorrect.  Maliciously
crafted object names could present a SQL injection risk when the script
is reloaded.

Reported by Heikki Linnakangas, patch by Robert Haas

Security: CVE-2012-0868

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2d2f63ddccc6a557e7eb35252483fea7fe4a688a

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c |   60 +++++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 4 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in pg_dump comments.
@ 2012-02-23 23:04  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 12+ messages in thread

From: Tom Lane @ 2012-02-23 23:04 UTC (permalink / raw)
  To: pgsql-committers

Convert newlines to spaces in names written in pg_dump comments.

pg_dump was incautious about sanitizing object names that are emitted
within SQL comments in its output script.  A name containing a newline
would at least render the script syntactically incorrect.  Maliciously
crafted object names could present a SQL injection risk when the script
is reloaded.

Reported by Heikki Linnakangas, patch by Robert Haas

Security: CVE-2012-0868

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/02f013ee0228337626071d71abaf2dcb143614a4

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c |   60 +++++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 4 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in pg_dump comments.
@ 2012-02-23 23:04  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 12+ messages in thread

From: Tom Lane @ 2012-02-23 23:04 UTC (permalink / raw)
  To: pgsql-committers

Convert newlines to spaces in names written in pg_dump comments.

pg_dump was incautious about sanitizing object names that are emitted
within SQL comments in its output script.  A name containing a newline
would at least render the script syntactically incorrect.  Maliciously
crafted object names could present a SQL injection risk when the script
is reloaded.

Reported by Heikki Linnakangas, patch by Robert Haas

Security: CVE-2012-0868

Branch
------
REL8_4_STABLE

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

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c |   60 +++++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 4 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in pg_dump comments.
@ 2012-02-23 23:04  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 12+ messages in thread

From: Tom Lane @ 2012-02-23 23:04 UTC (permalink / raw)
  To: pgsql-committers

Convert newlines to spaces in names written in pg_dump comments.

pg_dump was incautious about sanitizing object names that are emitted
within SQL comments in its output script.  A name containing a newline
would at least render the script syntactically incorrect.  Maliciously
crafted object names could present a SQL injection risk when the script
is reloaded.

Reported by Heikki Linnakangas, patch by Robert Haas

Security: CVE-2012-0868

Branch
------
REL8_3_STABLE

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

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c |   60 +++++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 4 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2179e6005ec9500d5e130f53f7d3ed7c8d4439a9

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 11 +++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 19 ++++++++++++--
7 files changed, 89 insertions(+), 42 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/70693c645f6e490b9ed450e8611e94ab7af3aad2

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 13 ++++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 16 ++++++++++++
7 files changed, 90 insertions(+), 40 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9751f934aa80f855f742425e16f669c44f6d0b9b

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 13 ++++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 17 ++++++++++++-
7 files changed, 90 insertions(+), 41 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0f583843840638d5a8ee13e1b6e20e38723cc5d9

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 11 +++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 19 ++++++++++++--
7 files changed, 89 insertions(+), 42 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9b92f115bdf9f21e9a8c4dcd80207c0723e81c3b

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 13 ++++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 17 ++++++++++++-
7 files changed, 90 insertions(+), 41 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/13a67ce6034ed674a4e797c6f1545831189be02e

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 13 ++++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 16 ++++++++++++
7 files changed, 90 insertions(+), 40 deletions(-)



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

* pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm
@ 2025-08-11 13:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Noah Misch @ 2025-08-11 13:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Convert newlines to spaces in names written in v11+ pg_dump comments.

Maliciously-crafted object names could achieve SQL injection during
restore.  CVE-2012-0868 fixed this class of problem at the time, but
later work reintroduced three cases.  Commit
bc8cd50fefd369b217f80078585c486505aafb62 (back-patched to v11+ in
2023-05 releases) introduced the pg_dump case.  Commit
6cbdbd9e8d8f2986fde44f2431ed8d0c8fce7f5d (v12+) introduced the two
pg_dumpall cases.  Move sanitize_line(), unchanged, to dumputils.c so
pg_dumpall has access to it in all supported versions.  Back-patch to
v13 (all supported versions).

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 13
Security: CVE-2025-8715

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/850caae60c49c15ed021f8051dc39c6e24f2a380

Modified Files
--------------
src/bin/pg_dump/dumputils.c                  | 37 ++++++++++++++++++++++++++++
src/bin/pg_dump/dumputils.h                  |  1 +
src/bin/pg_dump/pg_backup_archiver.c         | 37 ----------------------------
src/bin/pg_dump/pg_dump.c                    |  5 +++-
src/bin/pg_dump/pg_dumpall.c                 | 13 ++++++++--
src/bin/pg_dump/t/002_pg_dump.pl             | 21 ++++++++++++++++
src/bin/pg_dump/t/003_pg_dump_with_server.pl | 17 ++++++++++++-
7 files changed, 90 insertions(+), 41 deletions(-)



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


end of thread, other threads:[~2025-08-11 13:22 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 23:04 pgsql: Convert newlines to spaces in names written in pg_dump comments. Tom Lane <tgl@sss.pgh.pa.us>
2012-02-23 23:04 pgsql: Convert newlines to spaces in names written in pg_dump comments. Tom Lane <tgl@sss.pgh.pa.us>
2012-02-23 23:04 pgsql: Convert newlines to spaces in names written in pg_dump comments. Tom Lane <tgl@sss.pgh.pa.us>
2012-02-23 23:04 pgsql: Convert newlines to spaces in names written in pg_dump comments. Tom Lane <tgl@sss.pgh.pa.us>
2012-02-23 23:04 pgsql: Convert newlines to spaces in names written in pg_dump comments. Tom Lane <tgl@sss.pgh.pa.us>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>
2025-08-11 13:22 pgsql: Convert newlines to spaces in names written in v11+ pg_dump comm Noah Misch <noah@leadboat.com>

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