- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit13a67ce
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 parent605fdb9 commit13a67ce
File tree
7 files changed
+90
-40
lines changed- src/bin/pg_dump
- t
7 files changed
+90
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 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 | + | |
| 69 | + | |
| 70 | + | |
34 | 71 | | |
35 | 72 | | |
36 | 73 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
4035 | 4034 | | |
4036 | 4035 | | |
4037 | 4036 | | |
4038 | | - | |
4039 | | - | |
4040 | | - | |
4041 | | - | |
4042 | | - | |
4043 | | - | |
4044 | | - | |
4045 | | - | |
4046 | | - | |
4047 | | - | |
4048 | | - | |
4049 | | - | |
4050 | | - | |
4051 | | - | |
4052 | | - | |
4053 | | - | |
4054 | | - | |
4055 | | - | |
4056 | | - | |
4057 | | - | |
4058 | | - | |
4059 | | - | |
4060 | | - | |
4061 | | - | |
4062 | | - | |
4063 | | - | |
4064 | | - | |
4065 | | - | |
4066 | | - | |
4067 | | - | |
4068 | | - | |
4069 | | - | |
4070 | | - | |
4071 | | - | |
4072 | | - | |
4073 | | - | |
4074 | 4037 | | |
4075 | 4038 | | |
4076 | 4039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2802 | 2802 | | |
2803 | 2803 | | |
2804 | 2804 | | |
| 2805 | + | |
2805 | 2806 | | |
2806 | 2807 | | |
2807 | 2808 | | |
| 2809 | + | |
2808 | 2810 | | |
2809 | | - | |
| 2811 | + | |
| 2812 | + | |
2810 | 2813 | | |
2811 | 2814 | | |
2812 | 2815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
1495 | | - | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
1496 | 1502 | | |
1497 | 1503 | | |
1498 | 1504 | | |
| |||
1594 | 1600 | | |
1595 | 1601 | | |
1596 | 1602 | | |
| 1603 | + | |
1597 | 1604 | | |
1598 | 1605 | | |
1599 | 1606 | | |
| |||
1610 | 1617 | | |
1611 | 1618 | | |
1612 | 1619 | | |
1613 | | - | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
1614 | 1623 | | |
1615 | 1624 | | |
1616 | 1625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2222 | 2222 | | |
2223 | 2223 | | |
2224 | 2224 | | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
2225 | 2246 | | |
2226 | 2247 | | |
2227 | 2248 | | |
| |||
| 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 | | |
| |||
0 commit comments
Comments
(0)