forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3492a0a
committed
Fix RelationBuildPartitionKey's processing of partition key expressions.
Failure to advance the list pointer while reading partition expressionsfrom a list results in invoking an input function with inappropriate data,possibly leading to crashes or, with carefully crafted input, disclosureof arbitrary backend memory.Bug discovered independently by Álvaro Herrera and David Rowley.This patch is by Álvaro but owes something to David's proposed fix.Back-patch to v10 where the issue was introduced.Security:CVE-2018-10521 parent05d0f13 commit3492a0a
File tree
3 files changed
+34
-9
lines changed- src
- backend/utils/cache
- test/regress
- expected
- sql
3 files changed
+34
-9
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
983 | 983 |
| |
984 | 984 |
| |
985 | 985 |
| |
| 986 | + | |
| 987 | + | |
| 988 | + | |
986 | 989 |
| |
987 | 990 |
| |
988 | 991 |
| |
| 992 | + | |
| 993 | + | |
989 | 994 |
| |
990 | 995 |
| |
991 | 996 |
| |
|
Lines changed: 22 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
422 |
| - | |
423 |
| - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
424 | 425 |
| |
425 | 426 |
| |
426 | 427 |
| |
| |||
436 | 437 |
| |
437 | 438 |
| |
438 | 439 |
| |
439 |
| - | |
440 |
| - | |
441 |
| - | |
442 |
| - | |
443 |
| - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
444 | 446 |
| |
445 | 447 |
| |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
446 | 461 |
| |
447 | 462 |
| |
448 | 463 |
| |
|
Lines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
422 |
| - | |
423 |
| - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
424 | 425 |
| |
425 | 426 |
| |
426 | 427 |
| |
427 | 428 |
| |
428 | 429 |
| |
429 | 430 |
| |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
430 | 435 |
| |
431 | 436 |
| |
432 | 437 |
| |
|
0 commit comments
Comments
(0)