- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit850caae
committed
Convert newlines to spaces in names written in v11+ pg_dump comments.
Maliciously-crafted object names could achieve SQL injection duringrestore.CVE-2012-0868 fixed this class of problem at the time, butlater work reintroduced three cases. Commitbc8cd50 (back-patched to v11+ in2023-05 releases) introduced the pg_dump case. Commit6cbdbd9 (v12+) introduced the twopg_dumpall cases. Move sanitize_line(), unchanged, to dumputils.c sopg_dumpall has access to it in all supported versions. Back-patch tov13 (all supported versions).Reviewed-by: Robert Haas <robertmhaas@gmail.com>Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Backpatch-through: 13Security:CVE-2025-87151 parent1926342 commit850caae
File tree
7 files changed
+90
-41
lines changed- src/bin/pg_dump
- t
7 files changed
+90
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
32 | 69 | | |
33 | 70 | | |
34 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
3684 | 3683 | | |
3685 | 3684 | | |
3686 | 3685 | | |
3687 | | - | |
3688 | | - | |
3689 | | - | |
3690 | | - | |
3691 | | - | |
3692 | | - | |
3693 | | - | |
3694 | | - | |
3695 | | - | |
3696 | | - | |
3697 | | - | |
3698 | | - | |
3699 | | - | |
3700 | | - | |
3701 | | - | |
3702 | | - | |
3703 | | - | |
3704 | | - | |
3705 | | - | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
3712 | | - | |
3713 | | - | |
3714 | | - | |
3715 | | - | |
3716 | | - | |
3717 | | - | |
3718 | | - | |
3719 | | - | |
3720 | | - | |
3721 | | - | |
3722 | | - | |
3723 | 3686 | | |
3724 | 3687 | | |
3725 | 3688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2609 | 2609 | | |
2610 | 2610 | | |
2611 | 2611 | | |
| 2612 | + | |
2612 | 2613 | | |
2613 | 2614 | | |
2614 | 2615 | | |
| 2616 | + | |
2615 | 2617 | | |
2616 | | - | |
| 2618 | + | |
| 2619 | + | |
2617 | 2620 | | |
2618 | 2621 | | |
2619 | 2622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
1450 | | - | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1451 | 1457 | | |
1452 | 1458 | | |
1453 | 1459 | | |
| |||
1549 | 1555 | | |
1550 | 1556 | | |
1551 | 1557 | | |
| 1558 | + | |
1552 | 1559 | | |
1553 | 1560 | | |
1554 | 1561 | | |
| |||
1565 | 1572 | | |
1566 | 1573 | | |
1567 | 1574 | | |
1568 | | - | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1569 | 1578 | | |
1570 | 1579 | | |
1571 | 1580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1907 | 1907 | | |
1908 | 1908 | | |
1909 | 1909 | | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
1910 | 1931 | | |
1911 | 1932 | | |
1912 | 1933 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
19 | 35 | | |
20 | 36 | | |
21 | 37 | | |
| |||
26 | 42 | | |
27 | 43 | | |
28 | 44 | | |
29 | | - | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
0 commit comments
Comments
(0)