Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
13.0.1
-
None
-
None
-
MariaDB Server 13.0.1 (tag mariadb-13.0.1); also present on main tip. Confirmed by source review on macOS arm64.
-
Can result in hang or crash
-
Q3/2026 Server Development
Description
In `storage/maria/ma_key_recover.c`, `_ma_apply_redo_index()` handles `KEY_OP_CHANGE` as:
```c
case KEY_OP_CHANGE:
uint length= uint2korr(header);
DBUG_ASSERT(page_offset != 0 && page_offset + length <= page_length);
memcpy(buff + page_offset, header + 2, length);
page_offset+= length;
header+= 2 + length;
```
There is no check that `header + 2 + length <= header_end` before reading from the redo buffer. In release builds the page-side `DBUG_ASSERT` is also a no-op.
A truncated or corrupt `LOGREC_REDO_INDEX` can therefore cause an out-of-bounds read from the log record (and may write past the page if `page_offset + length` is also unchecked).
-
- Impact
Crash recovery / redo apply can crash or read past the redo buffer on a malformed CHANGE record.
- Impact