Bug #107390 | Audit plugin does not log multiqueries correctly | ||
---|---|---|---|
Submitted: | 24 May 2022 20:48 | Modified: | 8 Dec 2022 16:13 |
Reporter: | Manuel Ung | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Security: Audit | Severity: | S3 (Non-critical) |
Version: | 8.0.29 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[24 May 2022 20:48]
Manuel Ung
[25 May 2022 6:00]
MySQL Verification Team
Hello Manuel Ung, Thank you for the report and feedback. regards, Umesh
[26 May 2022 7:40]
Georgi Kodinov
Posted by developer: I am guessing this is only a problem for the GENERAL LOG events. And that's because the general log event is logged before the query is manipulated into the THD. The query events should be fine since the logging is done after the THD data are reset. Can you maybe be specific on which event classes do you see the issue?
[27 May 2022 20:47]
Marek Szymczak
fprintf line should be: fprintf(stderr, "%.*s\n", (int)query->length, query->str);
[27 May 2022 20:49]
Marek Szymczak
fprintf line should be: fprintf(stderr, "%.*s\n", (int)query->length, query->str);
[27 May 2022 21:36]
Manuel Ung
Yes, you're right, it only affects GENERAL LOG events. I got my fprintf statement wrong, so it looked like it affected all event classes.
[8 Dec 2022 16:13]
Christine Cole
Posted by developer: Fixed as of the upcoming MySQL 8.0.32 / 5.7.41 releases, and here's the proposed changelog entry from the documentation team: The audit_log server-side plugin always logged an entire multiple query, rather than logging only the specific part of the query that was executed. Changing when the query length is set resolves the issue. Thank you for the bug report.