agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Avoid unsafe access to negative index in a TupleDesc. 5+ messages / 1 participants [nested] [flat]
* pgsql: Avoid unsafe access to negative index in a TupleDesc. @ 2026-04-06 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2026-04-06 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unsafe access to negative index in a TupleDesc. Commit aa606b931 installed a test that would reference a nonexistent TupleDesc array entry if a system column is used in COPY FROM WHERE. Typically this would be harmless, but with bad luck it could result in a phony "generated columns are not supported in COPY FROM WHERE conditions" error, and at least in principle it could cause SIGSEGV. (Compare 570e2fcc0 which fixed the identical problem in another place.) Also, since c98ad086a it throws an Assert instead. In the back branches, just guard the test to make it a safe no-op for system columns. Commit 21c69dc73 installed a more aggressive answer in master. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/6f435023-8ab6-47c2-ba07-035d0c4212f9@gmail.com Backpatch-through: 14-18 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3c7a6bbe63e2707c6bd50ccab64d68756e6b7c78 Modified Files -------------- src/backend/commands/copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid unsafe access to negative index in a TupleDesc. @ 2026-04-06 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2026-04-06 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unsafe access to negative index in a TupleDesc. Commit aa606b931 installed a test that would reference a nonexistent TupleDesc array entry if a system column is used in COPY FROM WHERE. Typically this would be harmless, but with bad luck it could result in a phony "generated columns are not supported in COPY FROM WHERE conditions" error, and at least in principle it could cause SIGSEGV. (Compare 570e2fcc0 which fixed the identical problem in another place.) Also, since c98ad086a it throws an Assert instead. In the back branches, just guard the test to make it a safe no-op for system columns. Commit 21c69dc73 installed a more aggressive answer in master. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/6f435023-8ab6-47c2-ba07-035d0c4212f9@gmail.com Backpatch-through: 14-18 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/40fa04e7c851752e79ac50c512bd1dea2c3002bf Modified Files -------------- src/backend/commands/copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid unsafe access to negative index in a TupleDesc. @ 2026-04-06 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2026-04-06 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unsafe access to negative index in a TupleDesc. Commit aa606b931 installed a test that would reference a nonexistent TupleDesc array entry if a system column is used in COPY FROM WHERE. Typically this would be harmless, but with bad luck it could result in a phony "generated columns are not supported in COPY FROM WHERE conditions" error, and at least in principle it could cause SIGSEGV. (Compare 570e2fcc0 which fixed the identical problem in another place.) Also, since c98ad086a it throws an Assert instead. In the back branches, just guard the test to make it a safe no-op for system columns. Commit 21c69dc73 installed a more aggressive answer in master. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/6f435023-8ab6-47c2-ba07-035d0c4212f9@gmail.com Backpatch-through: 14-18 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/07e833e3cff3da136980c7a4e30e965f825ae83c Modified Files -------------- src/backend/commands/copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid unsafe access to negative index in a TupleDesc. @ 2026-04-06 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2026-04-06 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unsafe access to negative index in a TupleDesc. Commit aa606b931 installed a test that would reference a nonexistent TupleDesc array entry if a system column is used in COPY FROM WHERE. Typically this would be harmless, but with bad luck it could result in a phony "generated columns are not supported in COPY FROM WHERE conditions" error, and at least in principle it could cause SIGSEGV. (Compare 570e2fcc0 which fixed the identical problem in another place.) Also, since c98ad086a it throws an Assert instead. In the back branches, just guard the test to make it a safe no-op for system columns. Commit 21c69dc73 installed a more aggressive answer in master. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/6f435023-8ab6-47c2-ba07-035d0c4212f9@gmail.com Backpatch-through: 14-18 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/681a91d29d4d8722b4e6fbafd2a6ee5b6b6c6068 Modified Files -------------- src/backend/commands/copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid unsafe access to negative index in a TupleDesc. @ 2026-04-06 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2026-04-06 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unsafe access to negative index in a TupleDesc. Commit aa606b931 installed a test that would reference a nonexistent TupleDesc array entry if a system column is used in COPY FROM WHERE. Typically this would be harmless, but with bad luck it could result in a phony "generated columns are not supported in COPY FROM WHERE conditions" error, and at least in principle it could cause SIGSEGV. (Compare 570e2fcc0 which fixed the identical problem in another place.) Also, since c98ad086a it throws an Assert instead. In the back branches, just guard the test to make it a safe no-op for system columns. Commit 21c69dc73 installed a more aggressive answer in master. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/6f435023-8ab6-47c2-ba07-035d0c4212f9@gmail.com Backpatch-through: 14-18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/11c2c0cc8d7c9fb0b68390b2b3550b54cf045dbc Modified Files -------------- src/backend/commands/copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-04-06 18:22 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-04-06 18:22 pgsql: Avoid unsafe access to negative index in a TupleDesc. Tom Lane <tgl@sss.pgh.pa.us> 2026-04-06 18:22 pgsql: Avoid unsafe access to negative index in a TupleDesc. Tom Lane <tgl@sss.pgh.pa.us> 2026-04-06 18:22 pgsql: Avoid unsafe access to negative index in a TupleDesc. Tom Lane <tgl@sss.pgh.pa.us> 2026-04-06 18:22 pgsql: Avoid unsafe access to negative index in a TupleDesc. Tom Lane <tgl@sss.pgh.pa.us> 2026-04-06 18:22 pgsql: Avoid unsafe access to negative index in a TupleDesc. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox