- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit9b92f11
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 parentac4c0d3 commit9b92f11
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 | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
3915 | 3914 | | |
3916 | 3915 | | |
3917 | 3916 | | |
3918 | | - | |
3919 | | - | |
3920 | | - | |
3921 | | - | |
3922 | | - | |
3923 | | - | |
3924 | | - | |
3925 | | - | |
3926 | | - | |
3927 | | - | |
3928 | | - | |
3929 | | - | |
3930 | | - | |
3931 | | - | |
3932 | | - | |
3933 | | - | |
3934 | | - | |
3935 | | - | |
3936 | | - | |
3937 | | - | |
3938 | | - | |
3939 | | - | |
3940 | | - | |
3941 | | - | |
3942 | | - | |
3943 | | - | |
3944 | | - | |
3945 | | - | |
3946 | | - | |
3947 | | - | |
3948 | | - | |
3949 | | - | |
3950 | | - | |
3951 | | - | |
3952 | | - | |
3953 | | - | |
3954 | 3917 | | |
3955 | 3918 | | |
3956 | 3919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2657 | 2657 | | |
2658 | 2658 | | |
2659 | 2659 | | |
| 2660 | + | |
2660 | 2661 | | |
2661 | 2662 | | |
2662 | 2663 | | |
| 2664 | + | |
2663 | 2665 | | |
2664 | | - | |
| 2666 | + | |
| 2667 | + | |
2665 | 2668 | | |
2666 | 2669 | | |
2667 | 2670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
1465 | | - | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1466 | 1472 | | |
1467 | 1473 | | |
1468 | 1474 | | |
| |||
1564 | 1570 | | |
1565 | 1571 | | |
1566 | 1572 | | |
| 1573 | + | |
1567 | 1574 | | |
1568 | 1575 | | |
1569 | 1576 | | |
| |||
1580 | 1587 | | |
1581 | 1588 | | |
1582 | 1589 | | |
1583 | | - | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
1584 | 1593 | | |
1585 | 1594 | | |
1586 | 1595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
1896 | 1917 | | |
1897 | 1918 | | |
1898 | 1919 | | |
| |||
| 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)