forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit521a715
committed
Fix privilege checks in pg_stats_ext and pg_stats_ext_exprs.
The catalog view pg_stats_ext fails to consider privileges forexpression statistics. The catalog view pg_stats_ext_exprs failsto consider privileges and row-level security policies. To fix,restrict the data in these views to table owners or roles thatinherit privileges of the table owner. It may be possible to applyless restrictive privilege checks in some cases, but that is leftas a future exercise. Furthermore, for pg_stats_ext_exprs, do notreturn data for tables with row-level security enabled, as isalready done for pg_stats_ext.On the back-branches, a fix-CVE-2024-4317.sql script is providedthat will install into the "share" directory. This file can beused to apply the fix to existing clusters.Bumps catversion on 'master' branch only.Reported-by: Lukas FittlReviewed-by: Noah Misch, Tomas Vondra, Tom LaneSecurity:CVE-2024-4317Backpatch-through: 141 parentd1d286d commit521a715
File tree
7 files changed
+81
-17
lines changed- doc/src/sgml
- src
- backend/catalog
- include/catalog
- test/regress
- expected
- sql
7 files changed
+81
-17
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7788 | 7788 |
| |
7789 | 7789 |
| |
7790 | 7790 |
| |
7791 |
| - | |
7792 |
| - | |
| 7791 | + | |
7793 | 7792 |
| |
7794 | 7793 |
| |
7795 | 7794 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3944 | 3944 |
| |
3945 | 3945 |
| |
3946 | 3946 |
| |
3947 |
| - | |
| 3947 | + | |
3948 | 3948 |
| |
3949 | 3949 |
| |
3950 | 3950 |
| |
| |||
4155 | 4155 |
| |
4156 | 4156 |
| |
4157 | 4157 |
| |
4158 |
| - | |
| 4158 | + | |
4159 | 4159 |
| |
4160 | 4160 |
| |
4161 | 4161 |
| |
|
Lines changed: 4 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
305 | 305 |
| |
306 | 306 |
| |
307 | 307 |
| |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 |
| - | |
312 |
| - | |
313 |
| - | |
| 308 | + | |
314 | 309 |
| |
315 | 310 |
| |
316 | 311 |
| |
| |||
380 | 375 |
| |
381 | 376 |
| |
382 | 377 |
| |
383 |
| - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
384 | 381 |
| |
385 | 382 |
| |
386 | 383 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
61 | 61 |
| |
62 | 62 |
|
Lines changed: 3 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2531 | 2531 |
| |
2532 | 2532 |
| |
2533 | 2533 |
| |
2534 |
| - | |
2535 |
| - | |
2536 |
| - | |
2537 |
| - | |
| 2534 | + | |
2538 | 2535 |
| |
2539 | 2536 |
| |
2540 | 2537 |
| |
| |||
2607 | 2604 |
| |
2608 | 2605 |
| |
2609 | 2606 |
| |
2610 |
| - | |
| 2607 | + | |
| 2608 | + | |
2611 | 2609 |
| |
2612 | 2610 |
| |
2613 | 2611 |
| |
|
Lines changed: 43 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3281 | 3281 |
| |
3282 | 3282 |
| |
3283 | 3283 |
| |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
3284 | 3326 |
| |
3285 | 3327 |
| |
3286 | 3328 |
| |
3287 | 3329 |
| |
| 3330 | + | |
3288 | 3331 |
| |
3289 | 3332 |
| |
3290 | 3333 |
| |
|
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1657 | 1657 |
| |
1658 | 1658 |
| |
1659 | 1659 |
| |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
1660 | 1686 |
| |
1661 | 1687 |
| |
1662 | 1688 |
| |
1663 | 1689 |
| |
| 1690 | + | |
1664 | 1691 |
| |
1665 | 1692 |
|
0 commit comments
Comments
(0)