POJIA破甲
地图 / libmariadb ( mariadb-connector-c ): stack overflow via server-controlled field->length in prepared-statement codec

libmariadb ( mariadb-connector-c ): stack overflow via server-controlled field->length in prepared-statement codec

内存破坏 / 栈溢出 / #3766217

厂商
MariaDB
严重程度
低危 · CVSS 4.1
赏金
—
弱点
栈溢出
研究员
@fg0x0
披露日期
2026-10-04
资产
MariaDB Server & Connectors - Denial of Service
CVE
—

该报告还没有中文解读。

原文摘录

摘自原文(4851 字符中的一小部分)
MariaDB Connector/C (libmariadb) calls `alloca()` with a length value read directly from the server's column-definition packet without any upper bound. A malicious MariaDB/MySQL server, or a MITM attacker on a non-TLS connection, can set `field->length` to a value exceeding the process stack size, …
原文中的代码
static void convert_from_long(MYSQL_BIND *r_param, const MYSQL_FIELD *field,
                               long long val)
{
  // ...
  default:
    {
      char *buffer;
      buffer = alloca(MAX(field->length, 22));  // <-- no upper bound
      // ...
    }
}

默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 MariaDB 所有。

时间线

  • 报告提交
  • 公开披露
阅读 HackerOne 原文 ↗作者 @fg0x0 · 版权归作者与 MariaDB 所有

同类报告

Stack overflow in XML ParsingNotepad++ · 2019-08-25Malformed playlist.txt in GoldSrc games leads to Access Violation & arbitrary code executionValve · 2019-09-17 · $1,000VLC 4.0.0 - Stack Buffer Overflow (SEH)VLC (European Commission - DIGIT) · 2020-02-10 · $2,817Buffer overflow In hl.exe's launch -game argument allows an attacker to execute arbitrary code locally or from browserValve · 2020-08-19Stack Buffer Overflow in mariadb-dump quote_name() Allows Malicious Server to Execute Arbitrary Code on ClientMariaDB · 2026-09-08Stack overflow affecting "ext" field on stylers.xml configuration fileNotepad++ · 2019-08-25