pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix unsafe access to BufferDescriptors 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix unsafe access to BufferDescriptors @ 2025-02-19 02:06 Richard Guo <rguo@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Richard Guo @ 2025-02-19 02:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe access to BufferDescriptors When considering a local buffer, the GetBufferDescriptor() call in BufferGetLSNAtomic() would be retrieving a shared buffer with a bad buffer ID. Since the code checks whether the buffer is shared before using the retrieved BufferDesc, this issue did not lead to any malfunction. Nonetheless this seems like trouble waiting to happen, so fix it by ensuring that GetBufferDescriptor() is only called when we know the buffer is shared. Author: Tender Wang <tndrwang@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAHewXNku-o46-9cmUgyv6LkSZ25doDrWq32p=oz9kfD8ovVJMg@mail.gmail.com Backpatch-through: 13 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/71d02dc478d574c75bd0af82cec774c7b9059a61 Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix unsafe access to BufferDescriptors @ 2025-02-19 02:09 Richard Guo <rguo@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Richard Guo @ 2025-02-19 02:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe access to BufferDescriptors When considering a local buffer, the GetBufferDescriptor() call in BufferGetLSNAtomic() would be retrieving a shared buffer with a bad buffer ID. Since the code checks whether the buffer is shared before using the retrieved BufferDesc, this issue did not lead to any malfunction. Nonetheless this seems like trouble waiting to happen, so fix it by ensuring that GetBufferDescriptor() is only called when we know the buffer is shared. Author: Tender Wang <tndrwang@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAHewXNku-o46-9cmUgyv6LkSZ25doDrWq32p=oz9kfD8ovVJMg@mail.gmail.com Backpatch-through: 13 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/49a450892a3e65619287c099d4b2493ae61aea9b Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix unsafe access to BufferDescriptors @ 2025-02-19 02:11 Richard Guo <rguo@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Richard Guo @ 2025-02-19 02:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe access to BufferDescriptors When considering a local buffer, the GetBufferDescriptor() call in BufferGetLSNAtomic() would be retrieving a shared buffer with a bad buffer ID. Since the code checks whether the buffer is shared before using the retrieved BufferDesc, this issue did not lead to any malfunction. Nonetheless this seems like trouble waiting to happen, so fix it by ensuring that GetBufferDescriptor() is only called when we know the buffer is shared. Author: Tender Wang <tndrwang@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAHewXNku-o46-9cmUgyv6LkSZ25doDrWq32p=oz9kfD8ovVJMg@mail.gmail.com Backpatch-through: 13 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4c6b5dd5f5cfaf42f2370f587df7238d5aba48b8 Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix unsafe access to BufferDescriptors @ 2025-02-19 02:13 Richard Guo <rguo@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Richard Guo @ 2025-02-19 02:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe access to BufferDescriptors When considering a local buffer, the GetBufferDescriptor() call in BufferGetLSNAtomic() would be retrieving a shared buffer with a bad buffer ID. Since the code checks whether the buffer is shared before using the retrieved BufferDesc, this issue did not lead to any malfunction. Nonetheless this seems like trouble waiting to happen, so fix it by ensuring that GetBufferDescriptor() is only called when we know the buffer is shared. Author: Tender Wang <tndrwang@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAHewXNku-o46-9cmUgyv6LkSZ25doDrWq32p=oz9kfD8ovVJMg@mail.gmail.com Backpatch-through: 13 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/24a74986a0961d2d1bb859a0c3062a7d1e072799 Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix unsafe access to BufferDescriptors @ 2025-02-19 02:15 Richard Guo <rguo@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Richard Guo @ 2025-02-19 02:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe access to BufferDescriptors When considering a local buffer, the GetBufferDescriptor() call in BufferGetLSNAtomic() would be retrieving a shared buffer with a bad buffer ID. Since the code checks whether the buffer is shared before using the retrieved BufferDesc, this issue did not lead to any malfunction. Nonetheless this seems like trouble waiting to happen, so fix it by ensuring that GetBufferDescriptor() is only called when we know the buffer is shared. Author: Tender Wang <tndrwang@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAHewXNku-o46-9cmUgyv6LkSZ25doDrWq32p=oz9kfD8ovVJMg@mail.gmail.com Backpatch-through: 13 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/07a55093cd2e80be5fb54c867208ef6c52bd00ce Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix unsafe access to BufferDescriptors @ 2025-02-19 02:16 Richard Guo <rguo@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Richard Guo @ 2025-02-19 02:16 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe access to BufferDescriptors When considering a local buffer, the GetBufferDescriptor() call in BufferGetLSNAtomic() would be retrieving a shared buffer with a bad buffer ID. Since the code checks whether the buffer is shared before using the retrieved BufferDesc, this issue did not lead to any malfunction. Nonetheless this seems like trouble waiting to happen, so fix it by ensuring that GetBufferDescriptor() is only called when we know the buffer is shared. Author: Tender Wang <tndrwang@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAHewXNku-o46-9cmUgyv6LkSZ25doDrWq32p=oz9kfD8ovVJMg@mail.gmail.com Backpatch-through: 13 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a38a7ad51ec8dc558d71806d7f1aee986723ccbc Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2025-02-19 02:16 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-02-19 02:06 pgsql: Fix unsafe access to BufferDescriptors Richard Guo <rguo@postgresql.org> 2025-02-19 02:09 pgsql: Fix unsafe access to BufferDescriptors Richard Guo <rguo@postgresql.org> 2025-02-19 02:11 pgsql: Fix unsafe access to BufferDescriptors Richard Guo <rguo@postgresql.org> 2025-02-19 02:13 pgsql: Fix unsafe access to BufferDescriptors Richard Guo <rguo@postgresql.org> 2025-02-19 02:15 pgsql: Fix unsafe access to BufferDescriptors Richard Guo <rguo@postgresql.org> 2025-02-19 02:16 pgsql: Fix unsafe access to BufferDescriptors Richard Guo <rguo@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox