forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc0ac4c7
committed
Prevent privilege escalation in explicit calls to PL validators.
The primary role of PL validators is to be called implicitly duringCREATE FUNCTION, but they are also normal functions that a user can callexplicitly. Add a permissions check to each validator to ensure that auser cannot use explicit validator calls to achieve things he could nototherwise achieve. Back-patch to 8.4 (all supported versions).Non-core procedural language extensions ought to make the same two-linechange to their own validators.Andres Freund, reviewed by Tom Lane and Noah Misch.Security:CVE-2014-00611 parent7890636 commitc0ac4c7
File tree
7 files changed
+104
-2
lines changed- doc/src/sgml
- src
- backend
- catalog
- commands
- utils/fmgr
- include
- pl
- plperl
- plpgsql/src
7 files changed
+104
-2
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
183 | 186 |
| |
184 | 187 |
| |
185 | 188 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
688 | 688 |
| |
689 | 689 |
| |
690 | 690 |
| |
| 691 | + | |
| 692 | + | |
| 693 | + | |
691 | 694 |
| |
692 | 695 |
| |
693 | 696 |
| |
| |||
735 | 738 |
| |
736 | 739 |
| |
737 | 740 |
| |
| 741 | + | |
| 742 | + | |
| 743 | + | |
738 | 744 |
| |
739 | 745 |
| |
740 | 746 |
| |
| |||
785 | 791 |
| |
786 | 792 |
| |
787 | 793 |
| |
| 794 | + | |
| 795 | + | |
| 796 | + | |
788 | 797 |
| |
789 | 798 |
| |
790 | 799 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
960 | 960 |
| |
961 | 961 |
| |
962 | 962 |
| |
963 |
| - | |
964 | 963 |
| |
965 | 964 |
| |
966 | 965 |
| |
|
Lines changed: 84 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
| |||
2409 | 2410 |
| |
2410 | 2411 |
| |
2411 | 2412 |
| |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| 521 | + | |
521 | 522 |
| |
522 | 523 |
| |
523 | 524 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1395 | 1395 |
| |
1396 | 1396 |
| |
1397 | 1397 |
| |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
1398 | 1401 |
| |
1399 | 1402 |
| |
1400 | 1403 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
| 220 | + | |
| 221 | + | |
| 222 | + | |
220 | 223 |
| |
221 | 224 |
| |
222 | 225 |
| |
|
0 commit comments
Comments
(0)