- Notifications
You must be signed in to change notification settings - Fork5
Commit33c6eaf
committed
Ignore SECURITY DEFINER and SET attributes for a PL's call handler.
It's not very sensible to set such attributes on a handler function;but if one were to do so, fmgr.c went into infinite recursion becauseit would call fmgr_security_definer instead of the handler function proper.There is no way for fmgr_security_definer to know that it ought to call thehandler and not the original function referenced by the FmgrInfo's fn_oid,so it tries to do the latter, causing the whole process to start overagain.Ordinarily such misconfiguration of a procedural language's handler couldbe written off as superuser error. However, because we allow non-superuserdatabase owners to create procedural languages and the handler for such alanguage becomes owned by the database owner, it is possible for a databaseowner to crash the backend, which ideally shouldn't be possible withoutsuperuser privileges. In 9.2 and up we will adjust things so that thehandler functions are always owned by superusers, but in existing branchesthis is a minor security fix.Problem noted by Noah Misch (after several of us had failed to detectit :-(). This isCVE-2012-2655.1 parentcd0ff9c commit33c6eaf
1 file changed
+11
-4
lines changedLines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 |
| - | |
| 161 | + | |
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
176 |
| - | |
| 176 | + | |
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
| |||
223 | 223 |
| |
224 | 224 |
| |
225 | 225 |
| |
226 |
| - | |
| 226 | + | |
| 227 | + | |
227 | 228 |
| |
228 | 229 |
| |
229 | 230 |
| |
| |||
405 | 406 |
| |
406 | 407 |
| |
407 | 408 |
| |
408 |
| - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
409 | 416 |
| |
410 | 417 |
| |
411 | 418 |
| |
|
0 commit comments
Comments
(0)