Skip to content

MariaDB CONNECT MDEV-41946: reproduce format-string DoS; RCE unproven - #1

Closed
yunshingng wants to merge 32 commits into
mainfrom
security-research/mariadb-connect-cwe134
Closed

yunshingng wants to merge 32 commits into
mainfrom
security-research/mariadb-connect-cwe134

Conversation

@yunshingng

@yunshingng yunshingng commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds an isolated Docker/GitHub Actions harness for MariaDB CONNECT issue MDEV-41946. This is a research-only directory; it does not modify Node.js runtime code.

Reproduced

  • MariaDB 11.4.13-MariaDB-ubu2404; CONNECT 1.07.0002 active.
  • Baseline partitioned CONNECT CSV table succeeds.
  • Extra-%s filename completes with a derived partition-file warning; no crash.
  • FILE_NAME containing %n reaches glibc __snprintf_chk, triggers "*** %n in writable segment detected ***", and aborts the server with signal 6.
  • CI asserts these outcomes: https://github.com/yunshingng/node/actions/runs/43732880118

Upstream confirmation

MariaDB upstream commit b01a176de5d4c814333fead0c85e431666e00fee explicitly describes MDEV-41946 as a table-option value used as a printf format string in GetRealString() and FileExists(), and fixes the substitution. It also adds a regression test containing %p, %d, %n, and %% tokens.

RCE assessment

RCE is not proven for this specific path. The vulnerable call is snprintf(sv, size, s, partname): only one explicit variadic argument is supplied. partname is an in-object char[65] buffer, and GetPartName() returns that buffer. Thus a first %n targets that fixed buffer, not an attacker-chosen address; additional conversions consume missing arguments (undefined behavior), which is not proof of controlled instruction flow. The tested fortified build aborts before the write.

Demonstrated impact: server-process denial of service on the tested fortified build.

Not demonstrated: arbitrary-address write, information disclosure, privilege escalation, code execution, or unauthenticated remote reachability. Do not conflate this with the separate historical CVE-2022-24051 / ZDI-22-318 advisory; that older advisory does not establish exploitability of MDEV-41946.

The test uses a privileged local SQL connection to create a partitioned CONNECT table. Exploitability depends on required SQL privileges and build configuration.

@yunshingng yunshingng changed the title Add isolated MariaDB CONNECT CWE-134 validation harness Add MariaDB CONNECT CWE-134 reproduction harness (confirmed %n DoS) Nov 15, 2026
@yunshingng yunshingng changed the title Add MariaDB CONNECT CWE-134 reproduction harness (confirmed %n DoS) MariaDB CONNECT MDEV-41946: reproduce format-string DoS; RCE unproven Nov 15, 2026
@yunshingng
yunshingng marked this pull request as ready for review November 15, 2026 16:12
@yunshingng yunshingng closed this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant