summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorJohn Naylor2024-12-04 09:51:55 +0000
committerJohn Naylor2024-12-04 09:59:12 +0000
commit83ce20d67184d79f7a1e65feed7c06ec03e4472d (patch)
treedb884fbf96d1121d30bfdf691cbf7760ec56e901 /doc/src
parent9abdc1841e16ff4eaf2fa8e2e0472ee71a4a5a5c (diff)
Fix use-after-free in parallel_vacuum_reset_dead_items
parallel_vacuum_reset_dead_items used a local variable to hold a pointer from the passed vacrel, purely as a shorthand. This pointer was later freed and a new allocation was made and stored to the struct. Then the local pointer was mistakenly referenced again. This apparently happened not to break anything since the freed chunk would have been put on the context's freelist, so it was accidentally the same pointer anyway, in which case the DSA handle was correctly updated. The minimal fix is to change two places so they access dead_items through the vacrel. This coding style is a maintenance hazard, so while at it get rid of most other similar usages, which were inconsistently used anyway. Analysis and patch by Vallimaharajan G, with further defensive coding by me Backpath to v17, when TidStore came in Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions