Skip to content
DoS Advisory Advanced CVE-2023-22057

GHSL-2023-116: Denial of Service (DoS) in MySQL - CVE-2023-22057

A use-after-free in MySQL's session GTID tracking allows an authenticated user to crash the server by toggling a session variable, resetting the connection, and committing a write transaction. This results in a denial of service.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

A segfault can be triggered by switching sessiontrackgtids on and off and then either resetting the session or switching users, resulting in a loss of service.

ghsecuritylab, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

This issue may lead to Denial of Service (DoS).

What the attacker needed

Authenticated MySQL session; ability to set session variables; ability to reset connection; write access to any table

The fix

The fix was made public as part of Oracle’s Critical Patch Update release for July.

How it was found

  1. Set session_track_gtids to OWN_GTID or ALL.
  2. Set session_track_gtids to OFF.
  3. Reset the connection using COM_CHANGE_USER or COM_RESET_CONNECTION.
  4. Set session_track_gtids to OWN_GTID or ALL again.
  5. Commit a write transaction to trigger the crash.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A use-after-free is a bug where a program keeps a pointer to memory after it has been freed, and later uses it. In MySQL, a session setting can leave such a dangling pointer, and when the session is reset and a write happens, the server crashes. An attacker with a normal database account can cause this crash, disrupting service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.