Skip to content

Commit 63f6cf4

Browse files
committed
Merge branch 'master' into anyelement
2 parents c442953 + f6a54fe commit 63f6cf4

File tree

43 files changed

+481
-389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+481
-389
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,8 +2645,7 @@ JumbleExpr(pgssJumbleState *jstate, Node *node)
26452645
InferenceElem *ie = (InferenceElem *) node;
26462646

26472647
APP_JUMB(ie->infercollid);
2648-
APP_JUMB(ie->inferopfamily);
2649-
APP_JUMB(ie->inferopcinputtype);
2648+
APP_JUMB(ie->inferopclass);
26502649
JumbleExpr(jstate, ie->expr);
26512650
}
26522651
break;

doc/src/sgml/catalogs.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5648,7 +5648,7 @@
56485648

56495649
<row>
56505650
<entry><structfield>provider</structfield></entry>
5651-
<entry><type>name</type></entry>
5651+
<entry><type>text</type></entry>
56525652
<entry></entry>
56535653
<entry>The label provider associated with this label.</entry>
56545654
</row>
@@ -5937,7 +5937,7 @@
59375937
</row>
59385938
<row>
59395939
<entry><structfield>provider</structfield></entry>
5940-
<entry><type>name</type></entry>
5940+
<entry><type>text</type></entry>
59415941
<entry></entry>
59425942
<entry>The label provider associated with this label.</entry>
59435943
</row>
@@ -9025,7 +9025,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
90259025
</row>
90269026
<row>
90279027
<entry><structfield>provider</structfield></entry>
9028-
<entry><type>name</type></entry>
9028+
<entry><type>text</type></entry>
90299029
<entry><literal><link linkend="catalog-pg-seclabel"><structname>pg_seclabel</structname></link>.provider</literal></entry>
90309030
<entry>The label provider associated with this label.</entry>
90319031
</row>

doc/src/sgml/release-9.0.sgml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<note>
88
<title>Release Date</title>
9-
<simpara>2015-05-21</simpara>
9+
<simpara>2015-05-22</simpara>
1010
</note>
1111

1212
<para>
@@ -58,18 +58,24 @@
5858

5959
<listitem>
6060
<para>
61-
Consistently check for failure of the <function>*printf()</> family of
62-
functions (Noah Misch)
61+
Improve detection of system-call failures (Noah Misch)
6362
</para>
6463

6564
<para>
66-
Most calls of these functions did not consider the possibility that
67-
the functions could fail with, eg, out-of-memory conditions. The usual
68-
result would just be missing output, but crashes or exposure of
69-
unintended information are also possible. To protect against such
70-
risks uniformly, create wrappers around these functions that throw an
71-
error on failure. Also add missing error checks to a few
72-
security-relevant calls of other system functions.
65+
Our replacement implementation of <function>snprintf()</> failed to
66+
check for errors reported by the underlying system library calls;
67+
the main case that might be missed is out-of-memory situations.
68+
In the worst case this might lead to information exposure, due to our
69+
code assuming that a buffer had been overwritten when it hadn't been.
70+
Also, there were a few places in which security-relevant calls of other
71+
system library functions did not check for failure.
72+
</para>
73+
74+
<para>
75+
It remains possible that some calls of the <function>*printf()</>
76+
family of functions are vulnerable to information disclosure if an
77+
out-of-memory error occurs at just the wrong time. We judge the risk
78+
to not be large, but will continue analysis in this area.
7379
(CVE-2015-3166)
7480
</para>
7581
</listitem>

doc/src/sgml/release-9.1.sgml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<note>
88
<title>Release Date</title>
9-
<simpara>2015-05-21</simpara>
9+
<simpara>2015-05-22</simpara>
1010
</note>
1111

1212
<para>
@@ -58,18 +58,24 @@
5858

5959
<listitem>
6060
<para>
61-
Consistently check for failure of the <function>*printf()</> family of
62-
functions (Noah Misch)
61+
Improve detection of system-call failures (Noah Misch)
6362
</para>
6463

6564
<para>
66-
Most calls of these functions did not consider the possibility that
67-
the functions could fail with, eg, out-of-memory conditions. The usual
68-
result would just be missing output, but crashes or exposure of
69-
unintended information are also possible. To protect against such
70-
risks uniformly, create wrappers around these functions that throw an
71-
error on failure. Also add missing error checks to a few
72-
security-relevant calls of other system functions.
65+
Our replacement implementation of <function>snprintf()</> failed to
66+
check for errors reported by the underlying system library calls;
67+
the main case that might be missed is out-of-memory situations.
68+
In the worst case this might lead to information exposure, due to our
69+
code assuming that a buffer had been overwritten when it hadn't been.
70+
Also, there were a few places in which security-relevant calls of other
71+
system library functions did not check for failure.
72+
</para>
73+
74+
<para>
75+
It remains possible that some calls of the <function>*printf()</>
76+
family of functions are vulnerable to information disclosure if an
77+
out-of-memory error occurs at just the wrong time. We judge the risk
78+
to not be large, but will continue analysis in this area.
7379
(CVE-2015-3166)
7480
</para>
7581
</listitem>

doc/src/sgml/release-9.2.sgml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<note>
88
<title>Release Date</title>
9-
<simpara>2015-05-21</simpara>
9+
<simpara>2015-05-22</simpara>
1010
</note>
1111

1212
<para>
@@ -58,18 +58,24 @@
5858

5959
<listitem>
6060
<para>
61-
Consistently check for failure of the <function>*printf()</> family of
62-
functions (Noah Misch)
61+
Improve detection of system-call failures (Noah Misch)
6362
</para>
6463

6564
<para>
66-
Most calls of these functions did not consider the possibility that
67-
the functions could fail with, eg, out-of-memory conditions. The usual
68-
result would just be missing output, but crashes or exposure of
69-
unintended information are also possible. To protect against such
70-
risks uniformly, create wrappers around these functions that throw an
71-
error on failure. Also add missing error checks to a few
72-
security-relevant calls of other system functions.
65+
Our replacement implementation of <function>snprintf()</> failed to
66+
check for errors reported by the underlying system library calls;
67+
the main case that might be missed is out-of-memory situations.
68+
In the worst case this might lead to information exposure, due to our
69+
code assuming that a buffer had been overwritten when it hadn't been.
70+
Also, there were a few places in which security-relevant calls of other
71+
system library functions did not check for failure.
72+
</para>
73+
74+
<para>
75+
It remains possible that some calls of the <function>*printf()</>
76+
family of functions are vulnerable to information disclosure if an
77+
out-of-memory error occurs at just the wrong time. We judge the risk
78+
to not be large, but will continue analysis in this area.
7379
(CVE-2015-3166)
7480
</para>
7581
</listitem>

doc/src/sgml/release-9.3.sgml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<note>
88
<title>Release Date</title>
9-
<simpara>2015-05-21</simpara>
9+
<simpara>2015-05-22</simpara>
1010
</note>
1111

1212
<para>
@@ -58,18 +58,24 @@
5858

5959
<listitem>
6060
<para>
61-
Consistently check for failure of the <function>*printf()</> family of
62-
functions (Noah Misch)
61+
Improve detection of system-call failures (Noah Misch)
6362
</para>
6463

6564
<para>
66-
Most calls of these functions did not consider the possibility that
67-
the functions could fail with, eg, out-of-memory conditions. The usual
68-
result would just be missing output, but crashes or exposure of
69-
unintended information are also possible. To protect against such
70-
risks uniformly, create wrappers around these functions that throw an
71-
error on failure. Also add missing error checks to a few
72-
security-relevant calls of other system functions.
65+
Our replacement implementation of <function>snprintf()</> failed to
66+
check for errors reported by the underlying system library calls;
67+
the main case that might be missed is out-of-memory situations.
68+
In the worst case this might lead to information exposure, due to our
69+
code assuming that a buffer had been overwritten when it hadn't been.
70+
Also, there were a few places in which security-relevant calls of other
71+
system library functions did not check for failure.
72+
</para>
73+
74+
<para>
75+
It remains possible that some calls of the <function>*printf()</>
76+
family of functions are vulnerable to information disclosure if an
77+
out-of-memory error occurs at just the wrong time. We judge the risk
78+
to not be large, but will continue analysis in this area.
7379
(CVE-2015-3166)
7480
</para>
7581
</listitem>

doc/src/sgml/release-9.4.sgml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<note>
88
<title>Release Date</title>
9-
<simpara>2015-05-21</simpara>
9+
<simpara>2015-05-22</simpara>
1010
</note>
1111

1212
<para>
@@ -87,22 +87,35 @@ Branch: REL9_3_STABLE [c669915fd] 2015-05-18 10:02:37 -0400
8787
Branch: REL9_2_STABLE [01272d95a] 2015-05-18 10:02:37 -0400
8888
Branch: REL9_1_STABLE [2cb9f2cab] 2015-05-18 10:02:38 -0400
8989
Branch: REL9_0_STABLE [9b5e831e3] 2015-05-18 10:02:38 -0400
90+
Author: Tom Lane <tgl@sss.pgh.pa.us>
91+
Branch: master [0c071936e] 2015-05-19 18:19:38 -0400
92+
Branch: REL9_4_STABLE [2eb2fcd56] 2015-05-19 18:16:19 -0400
93+
Branch: REL9_3_STABLE [13341276e] 2015-05-19 18:16:58 -0400
94+
Branch: REL9_2_STABLE [221f7a949] 2015-05-19 18:17:42 -0400
95+
Branch: REL9_1_STABLE [0510cff6e] 2015-05-19 18:18:16 -0400
96+
Branch: REL9_0_STABLE [cf893530a] 2015-05-19 18:18:56 -0400
9097
-->
9198

9299
<listitem>
93100
<para>
94-
Consistently check for failure of the <function>*printf()</> family of
95-
functions (Noah Misch)
101+
Improve detection of system-call failures (Noah Misch)
102+
</para>
103+
104+
<para>
105+
Our replacement implementation of <function>snprintf()</> failed to
106+
check for errors reported by the underlying system library calls;
107+
the main case that might be missed is out-of-memory situations.
108+
In the worst case this might lead to information exposure, due to our
109+
code assuming that a buffer had been overwritten when it hadn't been.
110+
Also, there were a few places in which security-relevant calls of other
111+
system library functions did not check for failure.
96112
</para>
97113

98114
<para>
99-
Most calls of these functions did not consider the possibility that
100-
the functions could fail with, eg, out-of-memory conditions. The usual
101-
result would just be missing output, but crashes or exposure of
102-
unintended information are also possible. To protect against such
103-
risks uniformly, create wrappers around these functions that throw an
104-
error on failure. Also add missing error checks to a few
105-
security-relevant calls of other system functions.
115+
It remains possible that some calls of the <function>*printf()</>
116+
family of functions are vulnerable to information disclosure if an
117+
out-of-memory error occurs at just the wrong time. We judge the risk
118+
to not be large, but will continue analysis in this area.
106119
(CVE-2015-3166)
107120
</para>
108121
</listitem>

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2651,7 +2651,7 @@ XLogFlush(XLogRecPtr record)
26512651

26522652
/*
26532653
* Re-check how far we can now flush the WAL. It's generally not
2654-
* safe to call WaitXLogInsetionsToFinish while holding
2654+
* safe to call WaitXLogInsertionsToFinish while holding
26552655
* WALWriteLock, because an in-progress insertion might need to
26562656
* also grab WALWriteLock to make progress. But we know that all
26572657
* the insertions up to insertpos have already finished, because

src/backend/commands/seclabel.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ GetSharedSecurityLabel(const ObjectAddress *object, const char *provider)
163163
ObjectIdGetDatum(object->classId));
164164
ScanKeyInit(&keys[2],
165165
Anum_pg_shseclabel_provider,
166-
BTEqualStrategyNumber, F_NAMEEQ,
167-
CStringGetDatum(provider));
166+
BTEqualStrategyNumber, F_TEXTEQ,
167+
CStringGetTextDatum(provider));
168168

169169
pg_shseclabel = heap_open(SharedSecLabelRelationId, AccessShareLock);
170170

@@ -220,8 +220,8 @@ GetSecurityLabel(const ObjectAddress *object, const char *provider)
220220
Int32GetDatum(object->objectSubId));
221221
ScanKeyInit(&keys[3],
222222
Anum_pg_seclabel_provider,
223-
BTEqualStrategyNumber, F_NAMEEQ,
224-
CStringGetDatum(provider));
223+
BTEqualStrategyNumber, F_TEXTEQ,
224+
CStringGetTextDatum(provider));
225225

226226
pg_seclabel = heap_open(SecLabelRelationId, AccessShareLock);
227227

@@ -256,7 +256,6 @@ SetSharedSecurityLabel(const ObjectAddress *object,
256256
SysScanDesc scan;
257257
HeapTuple oldtup;
258258
HeapTuple newtup = NULL;
259-
NameData providername;
260259
Datum values[Natts_pg_shseclabel];
261260
bool nulls[Natts_pg_shseclabel];
262261
bool replaces[Natts_pg_shseclabel];
@@ -266,8 +265,7 @@ SetSharedSecurityLabel(const ObjectAddress *object,
266265
memset(replaces, false, sizeof(replaces));
267266
values[Anum_pg_shseclabel_objoid - 1] = ObjectIdGetDatum(object->objectId);
268267
values[Anum_pg_shseclabel_classoid - 1] = ObjectIdGetDatum(object->classId);
269-
namestrcpy(&providername, provider);
270-
values[Anum_pg_shseclabel_provider - 1] = NameGetDatum(&providername);
268+
values[Anum_pg_shseclabel_provider - 1] = CStringGetTextDatum(provider);
271269
if (label != NULL)
272270
values[Anum_pg_shseclabel_label - 1] = CStringGetTextDatum(label);
273271

@@ -282,8 +280,8 @@ SetSharedSecurityLabel(const ObjectAddress *object,
282280
ObjectIdGetDatum(object->classId));
283281
ScanKeyInit(&keys[2],
284282
Anum_pg_shseclabel_provider,
285-
BTEqualStrategyNumber, F_NAMEEQ,
286-
CStringGetDatum(provider));
283+
BTEqualStrategyNumber, F_TEXTEQ,
284+
CStringGetTextDatum(provider));
287285

288286
pg_shseclabel = heap_open(SharedSecLabelRelationId, RowExclusiveLock);
289287

@@ -337,7 +335,6 @@ SetSecurityLabel(const ObjectAddress *object,
337335
SysScanDesc scan;
338336
HeapTuple oldtup;
339337
HeapTuple newtup = NULL;
340-
NameData providername;
341338
Datum values[Natts_pg_seclabel];
342339
bool nulls[Natts_pg_seclabel];
343340
bool replaces[Natts_pg_seclabel];
@@ -355,8 +352,7 @@ SetSecurityLabel(const ObjectAddress *object,
355352
values[Anum_pg_seclabel_objoid - 1] = ObjectIdGetDatum(object->objectId);
356353
values[Anum_pg_seclabel_classoid - 1] = ObjectIdGetDatum(object->classId);
357354
values[Anum_pg_seclabel_objsubid - 1] = Int32GetDatum(object->objectSubId);
358-
namestrcpy(&providername, provider);
359-
values[Anum_pg_seclabel_provider - 1] = NameGetDatum(&providername);
355+
values[Anum_pg_seclabel_provider - 1] = CStringGetTextDatum(provider);
360356
if (label != NULL)
361357
values[Anum_pg_seclabel_label - 1] = CStringGetTextDatum(label);
362358

@@ -375,8 +371,8 @@ SetSecurityLabel(const ObjectAddress *object,
375371
Int32GetDatum(object->objectSubId));
376372
ScanKeyInit(&keys[3],
377373
Anum_pg_seclabel_provider,
378-
BTEqualStrategyNumber, F_NAMEEQ,
379-
CStringGetDatum(provider));
374+
BTEqualStrategyNumber, F_TEXTEQ,
375+
CStringGetTextDatum(provider));
380376

381377
pg_seclabel = heap_open(SecLabelRelationId, RowExclusiveLock);
382378

src/backend/nodes/copyfuncs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,8 +1839,7 @@ _copyInferenceElem(const InferenceElem *from)
18391839

18401840
COPY_NODE_FIELD(expr);
18411841
COPY_SCALAR_FIELD(infercollid);
1842-
COPY_SCALAR_FIELD(inferopfamily);
1843-
COPY_SCALAR_FIELD(inferopcinputtype);
1842+
COPY_SCALAR_FIELD(inferopclass);
18441843

18451844
return newnode;
18461845
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy