| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
nls 修改: 移动 src/common/backend/po -> src/gausskernel/po, 修复线程池工作线程在还未设置 LC_CTYPE 期间认证失败打印导致翻译失败输出问号 "????" 问题, 增加会话级开关 enable_nls , 使用宏控制代码修改 | 2 年前 | |
fix(pg_recvlogical): bounds-check parallel-decode stream payloads (CWE-125) The text-mode decoders in pg_recvlogical's parallel logical replication path trusted every length field embedded in the server-supplied stream and fed them directly into appendBinaryPQExpBuffer (raw memcpy). A controlled or impersonated replication server could send a CopyData frame whose internal schemaLen/tableLen/colLen/dataLen/timeLen/changeLen pointed past the actual payload, causing the client to either leak adjacent process memory into the output file/stdout or crash. This change: - Threads payload_len from StreamLogicalLog through every decoder and validates every read against the actual PQgetCopyData-returned size via a new HasRemaining() helper. Each decoder returns false on the first malformed/oversized length field, and StreamLogicalLog discards the partially-decoded buffer and aborts the stream instead of writing it to outfd. Also closes a single-byte OOB read on the P/F trailer tag in StreamToText and adds a sanity check that changeLen is at least sizeof(XLogRecPtr) in BatchStreamToText. - Extracts ResolveTuple, DMLToText, BeginToText, CommitToText, StreamToText, BatchStreamToText and their helpers into a new src/bin/pg_basebackup/logical_decode.{h,cpp}. - Rejects malformed DML opcodes in DMLToText. Previously any byte other than 'I' or 'U' was treated as a DELETE, so a corrupted action byte produced a seemingly valid \"DELETE FROM ...\" and masked protocol corruption. Only accept 'I', 'U', 'D' explicitly and return false on any other value. - Replaces bare sizeof(uint32)*2 / sizeof(uint32)*4 multipliers in HasRemaining() calls with named constants (UINT64_PAIR_SIZE and BEGIN_FIXED_HEADER_SIZE) so readers do not have to decode the arithmetic at each call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> | 1 个月前 | |
fix(pg_recvlogical): bounds-check parallel-decode stream payloads (CWE-125) The text-mode decoders in pg_recvlogical's parallel logical replication path trusted every length field embedded in the server-supplied stream and fed them directly into appendBinaryPQExpBuffer (raw memcpy). A controlled or impersonated replication server could send a CopyData frame whose internal schemaLen/tableLen/colLen/dataLen/timeLen/changeLen pointed past the actual payload, causing the client to either leak adjacent process memory into the output file/stdout or crash. This change: - Threads payload_len from StreamLogicalLog through every decoder and validates every read against the actual PQgetCopyData-returned size via a new HasRemaining() helper. Each decoder returns false on the first malformed/oversized length field, and StreamLogicalLog discards the partially-decoded buffer and aborts the stream instead of writing it to outfd. Also closes a single-byte OOB read on the P/F trailer tag in StreamToText and adds a sanity check that changeLen is at least sizeof(XLogRecPtr) in BatchStreamToText. - Extracts ResolveTuple, DMLToText, BeginToText, CommitToText, StreamToText, BatchStreamToText and their helpers into a new src/bin/pg_basebackup/logical_decode.{h,cpp}. - Rejects malformed DML opcodes in DMLToText. Previously any byte other than 'I' or 'U' was treated as a DELETE, so a corrupted action byte produced a seemingly valid \"DELETE FROM ...\" and masked protocol corruption. Only accept 'I', 'U', 'D' explicitly and return false on any other value. - Replaces bare sizeof(uint32)*2 / sizeof(uint32)*4 multipliers in HasRemaining() calls with named constants (UINT64_PAIR_SIZE and BEGIN_FIXED_HEADER_SIZE) so readers do not have to decode the arithmetic at each call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> | 1 个月前 | |
fix(pg_recvlogical): bounds-check parallel-decode stream payloads (CWE-125) The text-mode decoders in pg_recvlogical's parallel logical replication path trusted every length field embedded in the server-supplied stream and fed them directly into appendBinaryPQExpBuffer (raw memcpy). A controlled or impersonated replication server could send a CopyData frame whose internal schemaLen/tableLen/colLen/dataLen/timeLen/changeLen pointed past the actual payload, causing the client to either leak adjacent process memory into the output file/stdout or crash. This change: - Threads payload_len from StreamLogicalLog through every decoder and validates every read against the actual PQgetCopyData-returned size via a new HasRemaining() helper. Each decoder returns false on the first malformed/oversized length field, and StreamLogicalLog discards the partially-decoded buffer and aborts the stream instead of writing it to outfd. Also closes a single-byte OOB read on the P/F trailer tag in StreamToText and adds a sanity check that changeLen is at least sizeof(XLogRecPtr) in BatchStreamToText. - Extracts ResolveTuple, DMLToText, BeginToText, CommitToText, StreamToText, BatchStreamToText and their helpers into a new src/bin/pg_basebackup/logical_decode.{h,cpp}. - Rejects malformed DML opcodes in DMLToText. Previously any byte other than 'I' or 'U' was treated as a DELETE, so a corrupted action byte produced a seemingly valid \"DELETE FROM ...\" and masked protocol corruption. Only accept 'I', 'U', 'D' explicitly and return false on any other value. - Replaces bare sizeof(uint32)*2 / sizeof(uint32)*4 multipliers in HasRemaining() calls with named constants (UINT64_PAIR_SIZE and BEGIN_FIXED_HEADER_SIZE) so readers do not have to decode the arithmetic at each call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> | 1 个月前 | |
fix(pg_recvlogical): bounds-check parallel-decode stream payloads (CWE-125) The text-mode decoders in pg_recvlogical's parallel logical replication path trusted every length field embedded in the server-supplied stream and fed them directly into appendBinaryPQExpBuffer (raw memcpy). A controlled or impersonated replication server could send a CopyData frame whose internal schemaLen/tableLen/colLen/dataLen/timeLen/changeLen pointed past the actual payload, causing the client to either leak adjacent process memory into the output file/stdout or crash. This change: - Threads payload_len from StreamLogicalLog through every decoder and validates every read against the actual PQgetCopyData-returned size via a new HasRemaining() helper. Each decoder returns false on the first malformed/oversized length field, and StreamLogicalLog discards the partially-decoded buffer and aborts the stream instead of writing it to outfd. Also closes a single-byte OOB read on the P/F trailer tag in StreamToText and adds a sanity check that changeLen is at least sizeof(XLogRecPtr) in BatchStreamToText. - Extracts ResolveTuple, DMLToText, BeginToText, CommitToText, StreamToText, BatchStreamToText and their helpers into a new src/bin/pg_basebackup/logical_decode.{h,cpp}. - Rejects malformed DML opcodes in DMLToText. Previously any byte other than 'I' or 'U' was treated as a DELETE, so a corrupted action byte produced a seemingly valid \"DELETE FROM ...\" and masked protocol corruption. Only accept 'I', 'U', 'D' explicitly and return false on any other value. - Replaces bare sizeof(uint32)*2 / sizeof(uint32)*4 multipliers in HasRemaining() calls with named constants (UINT64_PAIR_SIZE and BEGIN_FIXED_HEADER_SIZE) so readers do not have to decode the arithmetic at each call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> | 1 个月前 | |
nls 修改: 移动 src/common/backend/po -> src/gausskernel/po, 修复线程池工作线程在还未设置 LC_CTYPE 期间认证失败打印导致翻译失败输出问号 "????" 问题, 增加会话级开关 enable_nls , 使用宏控制代码修改 | 2 年前 | |
fix review comments: remove CVE numbers from code comments Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> | 23 天前 | |
主备共享存储 | 3 年前 | |
fix(pg_recvlogical): bounds-check parallel-decode stream payloads (CWE-125) The text-mode decoders in pg_recvlogical's parallel logical replication path trusted every length field embedded in the server-supplied stream and fed them directly into appendBinaryPQExpBuffer (raw memcpy). A controlled or impersonated replication server could send a CopyData frame whose internal schemaLen/tableLen/colLen/dataLen/timeLen/changeLen pointed past the actual payload, causing the client to either leak adjacent process memory into the output file/stdout or crash. This change: - Threads payload_len from StreamLogicalLog through every decoder and validates every read against the actual PQgetCopyData-returned size via a new HasRemaining() helper. Each decoder returns false on the first malformed/oversized length field, and StreamLogicalLog discards the partially-decoded buffer and aborts the stream instead of writing it to outfd. Also closes a single-byte OOB read on the P/F trailer tag in StreamToText and adds a sanity check that changeLen is at least sizeof(XLogRecPtr) in BatchStreamToText. - Extracts ResolveTuple, DMLToText, BeginToText, CommitToText, StreamToText, BatchStreamToText and their helpers into a new src/bin/pg_basebackup/logical_decode.{h,cpp}. - Rejects malformed DML opcodes in DMLToText. Previously any byte other than 'I' or 'U' was treated as a DELETE, so a corrupted action byte produced a seemingly valid \"DELETE FROM ...\" and masked protocol corruption. Only accept 'I', 'U', 'D' explicitly and return false on any other value. - Replaces bare sizeof(uint32)*2 / sizeof(uint32)*4 multipliers in HasRemaining() calls with named constants (UINT64_PAIR_SIZE and BEGIN_FIXED_HEADER_SIZE) so readers do not have to decode the arithmetic at each call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> | 1 个月前 | |
修复build进程hang住的问题 | 2 年前 | |
同步source code 日期: 12-26 revision: ee5b054c | 5 年前 | |
gs_basebackup支持通过-W指定密码(原先逻辑通过不指定-W的方式继承) | 2 年前 | |
gs_basebackup支持通过-W指定密码(原先逻辑通过不指定-W的方式继承) | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 2 年前 | ||
| 23 天前 | ||
| 3 年前 | ||
| 1 个月前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 |