forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit537cbd3
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 parentfea164a commit537cbd3
File tree
8 files changed
+109
-2
lines changed- doc/src/sgml
- src
- backend
- catalog
- commands
- utils/fmgr
- include
- pl
- plperl
- plpgsql/src
- plpython
8 files changed
+109
-2
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
182 | 185 |
| |
183 | 186 |
| |
184 | 187 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
723 | 723 |
| |
724 | 724 |
| |
725 | 725 |
| |
| 726 | + | |
| 727 | + | |
| 728 | + | |
726 | 729 |
| |
727 | 730 |
| |
728 | 731 |
| |
| |||
768 | 771 |
| |
769 | 772 |
| |
770 | 773 |
| |
| 774 | + | |
| 775 | + | |
| 776 | + | |
771 | 777 |
| |
772 | 778 |
| |
773 | 779 |
| |
| |||
819 | 825 |
| |
820 | 826 |
| |
821 | 827 |
| |
| 828 | + | |
| 829 | + | |
| 830 | + | |
822 | 831 |
| |
823 | 832 |
| |
824 | 833 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1017 | 1017 |
| |
1018 | 1018 |
| |
1019 | 1019 |
| |
1020 |
| - | |
1021 | 1020 |
| |
1022 | 1021 |
| |
1023 | 1022 |
| |
|
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 |
| |
| |||
2468 | 2469 |
| |
2469 | 2470 |
| |
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 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
629 | 629 |
| |
630 | 630 |
| |
631 | 631 |
| |
| 632 | + | |
632 | 633 |
| |
633 | 634 |
| |
634 | 635 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1883 | 1883 |
| |
1884 | 1884 |
| |
1885 | 1885 |
| |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
1886 | 1889 |
| |
1887 | 1890 |
| |
1888 | 1891 |
| |
| |||
1964 | 1967 |
| |
1965 | 1968 |
| |
1966 | 1969 |
| |
| 1970 | + | |
1967 | 1971 |
| |
1968 | 1972 |
| |
1969 | 1973 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 |
| |
294 | 297 |
| |
295 | 298 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 |
| |
164 | 167 |
| |
165 | 168 |
| |
| |||
185 | 188 |
| |
186 | 189 |
| |
187 | 190 |
| |
| 191 | + | |
188 | 192 |
| |
189 | 193 |
| |
190 | 194 |
| |
|
0 commit comments
Comments
(0)