aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2025-03-11 09:56:40 -0700
committerMasahiko Sawada <msawada@postgresql.org>2025-03-11 09:56:40 -0700
commitbd65cb3cd48a7a5ce48b26f8031ad3968efed87e (patch)
treefd6ae91a937707f9ab4adefb93ea1cd3a940e4da /src/backend/executor
parenta49927f04cd0c66e1bc41f551160fce50f382d8c (diff)
downloadpostgresql-bd65cb3cd48a7a5ce48b26f8031ad3968efed87e.tar.gz
postgresql-bd65cb3cd48a7a5ce48b26f8031ad3968efed87e.zip
pg_logicalinspect: Fix possible crash when passing a directory path.
Previously, pg_logicalinspect functions were too trusting of their input and blindly passed it to SnapBuildRestoreSnapshot(). If the input pointed to a directory, the server could a PANIC error while attempting to fsync_fname() with isdir=false on a directory. This commit adds validation checks for input filenames and passes the LSN extracted from the filename to SnapBuildRestoreSnapshot() instead of the filename itself. It also adds regression tests for various input patterns and permission checks. Bug: #18828 Reported-by: Robins Tharakan <tharakan@gmail.com> Co-authored-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Co-authored-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/18828-0f4701c635064211@postgresql.org
Diffstat (limited to 'src/backend/executor')
0 files changed, 0 insertions, 0 deletions