Apr 2023

1 commit
Add more protections in WAL record APIs against overflows
7 Apr 2023Michael Paquiermaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #391 of 3 reviewers saw the final version

The commit matches #39 in xloginsert.c and xlogrecord.h except for three diagnostic wording changes and an explicit uint32 cast when assigning xl_tot_len, plus commit-message edits. The attachment and commit both credit Matthias van de Meent despite Michael Paquier sending the final patch.

  • Andres Freundsaw an earlier versiontrailerAndres supplied the reproducer and early performance feedback in #4 and #6, then identified critical-section PANIC risks and proposed uint64 accumulation in #32 and #33, before substantial implementation changes.
  • Heikki Linnakangassaw an earlier versiontrailerHeikki reviewed the original checks in #2 and proposed a stable 1020 MiB cap with a decoder-capacity assertion in #23, before the accumulation and serialization logic was revised.
  • Michael Paquiersaw the final versiontrailerMichael repeatedly reviewed and revised the checks, found the uint64 serialization issue in #38, posted #39, and committed the final version.

Jul 2022

1 commit
Add overflow protection for block-related data in WAL records
27 Jul 2022Michael Paquiermaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 99% surepart of a posted patchsetmoderate changesfrom patchset #264 of 4 reviewers saw the final version

Extracts the unsigned XLogRegisterData()/XLogRegisterBufData() signatures, uint16 block-data limit, and assembly assertion/cast from #26, omitting whole-record protection and the common error helper. Michael explicitly confirms this extraction in #27; retained code also drops the registration-length assertion and receives comment edits.

  • Andres Freundsaw the final versiontrailerAndres reviewed block-check placement in #4 and requested unsigned length arguments in #6, with the committed block-data subset preserving that reviewed design apart from light cleanup.
  • Heikki Linnakangassaw the final versiontrailerHeikki proposed enforcing UINT16_MAX during registration in #2 and endorsed the unsigned-API/block-protection portion while questioning unlikely() hints in #23, after which that subset received only light cleanup.
  • Michael Paquiersaw the final versiontrailerMichael reviewed and simplified the patch in #20, reported no measurable block-registration overhead in #25, and committed the extracted subset described in #27.
  • Davidsaw the final versiontrailerDavid Zhang tested #7 in #11 and reported passing regression checks and successful oversized-record rejection for #17 in #18, whose block-data portion reached this commit with only light cleanup.

Credits across 2 commits

Author
Matthias van de Meent2
Reviewer
Andres Freund2
Heikki Linnakangas2
Michael Paquier2
David1
Committer
Michael Paquier2