forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit187e5d8
committed
Disallow RESET ROLE and RESET SESSION AUTHORIZATION inside security-definer
functions.This extends the previous patch that forbade SETting these variables insidesecurity-definer functions. RESET is equally a security hole, since itwould allow regaining privileges of the caller; furthermore it can triggerAssert failures and perhaps other internal errors, since the code is notexpecting these variables to change in such contexts. The previous patchdid not cover this case because assign hooks don't really have enoughinformation, so move the responsibility for preventing this into guc.c.Problem discovered by Heikki Linnakangas.Security: no CVE assigned yet, extendsCVE-2007-66001 parentd0a368c commit187e5d8
File tree
3 files changed
+33
-38
lines changed- src
- backend
- commands
- utils/misc
- include/utils
3 files changed
+33
-38
lines changedLines changed: 1 addition & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
717 | 717 |
| |
718 | 718 |
| |
719 | 719 |
| |
720 |
| - | |
721 |
| - | |
722 |
| - | |
723 |
| - | |
724 |
| - | |
725 |
| - | |
726 |
| - | |
727 |
| - | |
728 |
| - | |
729 |
| - | |
730 |
| - | |
731 |
| - | |
732 |
| - | |
733 |
| - | |
734 |
| - | |
735 | 720 |
| |
736 | 721 |
| |
737 | 722 |
| |
| |||
838 | 823 |
| |
839 | 824 |
| |
840 | 825 |
| |
841 |
| - | |
842 |
| - | |
843 |
| - | |
844 |
| - | |
845 |
| - | |
846 |
| - | |
847 |
| - | |
848 |
| - | |
849 |
| - | |
850 |
| - | |
851 |
| - | |
852 |
| - | |
853 |
| - | |
854 |
| - | |
855 |
| - | |
856 |
| - | |
857 |
| - | |
858 |
| - | |
859 | 826 |
| |
860 | 827 |
| |
861 | 828 |
| |
|
Lines changed: 29 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
2321 | 2321 |
| |
2322 | 2322 |
| |
2323 | 2323 |
| |
2324 |
| - | |
| 2324 | + | |
2325 | 2325 |
| |
2326 | 2326 |
| |
2327 | 2327 |
| |
| |||
2332 | 2332 |
| |
2333 | 2333 |
| |
2334 | 2334 |
| |
2335 |
| - | |
| 2335 | + | |
2336 | 2336 |
| |
2337 | 2337 |
| |
2338 | 2338 |
| |
| |||
4661 | 4661 |
| |
4662 | 4662 |
| |
4663 | 4663 |
| |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
4664 | 4690 |
| |
4665 | 4691 |
| |
4666 | 4692 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| 149 | + | |
| 150 | + | |
149 | 151 |
| |
150 | 152 |
| |
151 | 153 |
| |
|
0 commit comments
Comments
(0)