Skip to content

fix(ebpf): relax MySQL split header length check#11794

Merged
yinjiping merged 1 commit into
v6.6from
relax_MySQL
Jun 12, 2026
Merged

fix(ebpf): relax MySQL split header length check#11794
yinjiping merged 1 commit into
v6.6from
relax_MySQL

Conversation

@yinjiping

Copy link
Copy Markdown
Contributor

When MySQL packet header is read separately, prev_count == 4 means the 4-byte MySQL header has already been cached and the current buffer starts from the payload.

The packet payload length in the MySQL header does not necessarily equal the current syscall read/write length. Requiring len == count may cause valid split packets to skip MySQL inference.

Remove this strict check and always parse seq from the cached header and command bytes from the current payload buffer in the prev_count == 4 path. The later full packet length validation is still kept for initial protocol confirmation.

This PR is for:

  • Agent

Affected branches

  • v6.6

Comment thread agent/src/ebpf/kernel/include/protocol_inference.h
When MySQL packet header is read separately, prev_count == 4 means the
4-byte MySQL header has already been cached and the current buffer starts
from the payload.

The packet payload length in the MySQL header does not necessarily equal
the current syscall read/write length. Requiring len == count may cause
valid split packets to skip MySQL inference.

Remove this strict check and always parse seq from the cached header and
command bytes from the current payload buffer in the prev_count == 4 path.
The later full packet length validation is still kept for initial protocol
confirmation.
@yinjiping yinjiping merged commit 7c0cc09 into v6.6 Jun 12, 2026
8 checks passed
@yinjiping yinjiping deleted the relax_MySQL branch June 12, 2026 02:04
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.

2 participants