Bug #82670 | Setting the null_audit_event_record causes segmentation fault | ||
---|---|---|---|
Submitted: | 21 Aug 2016 12:07 | Modified: | 11 Apr 2017 7:20 |
Reporter: | Daniël van Eeden (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Security: Audit | Severity: | S2 (Serious) |
Version: | 5.7.14 | OS: | Any (x86_64) |
Assigned to: | Marek Szymczak | CPU Architecture: | Any |
Tags: | crash |
[21 Aug 2016 12:07]
Daniël van Eeden
[21 Aug 2016 12:44]
MySQL Verification Team
Thanks for the report! Verified on 5.7, 8.0. Version: '8.0.1-dmr-debug' socket: '' port: 3306 (Built on 2016/08/18) 12:42:59 UTC - mysqld got exception 0xc0000005 ; mysqld-debug.exe!list_delete()[list.cc:49] mysqld-debug.exe!plugin_var_memalloc_session_update()[sql_plugin.cc:3490] mysqld-debug.exe!sys_var_pluginvar::session_update()[sql_plugin.cc:3681] mysqld-debug.exe!sys_var::update()[set_var.cc:206] mysqld-debug.exe!set_var::update()[set_var.cc:929] mysqld-debug.exe!sql_set_variables()[set_var.cc:729] mysqld-debug.exe!mysql_execute_command()[sql_parse.cc:3391] mysqld-debug.exe!mysql_parse()[sql_parse.cc:5233] mysqld-debug.exe!dispatch_command()[sql_parse.cc:1483] mysqld-debug.exe!do_command()[sql_parse.cc:1043] mysqld-debug.exe!handle_connection()[connection_handler_per_thread.cc:301] mysqld-debug.exe!pfs_spawn_thread()[pfs.cc:2284] mysqld-debug.exe!win_thread_start()[my_thread.cc:41] mysqld-debug.exe!invoke_thread_procedure()[thread.cpp:92]
[14 Sep 2016 11:45]
Marek Szymczak
The purpose of the null_audit_event_record_def variable is to record audit event flow, which is very helpful during various plugin development activities. Please set it to NULL as a workaround (this should work I think): SET null_audit_event_record_def = NULL; Additionally value of the null_audit_event_record_def string is not being checked, so putting any random values will cause problems too: SET null_audit_event_record_def = 'EVENT_1;EVENT_2'; Not enough memory problems may occur. As it was already stated before, null_plugin is for test purposes only. Border conditions may not be handled properly.
[16 Dec 2016 18:42]
Paul DuBois
Posted by developer: Noted in 5.7.18, 8.0.1 changelog. For the null_audit plugin, setting the null_audit_event_record system variable improperly could cause a server exit. This variable should be set only from within the null_audit plugin, so it is now read only.
[11 Apr 2017 7:20]
Daniël van Eeden
commit b8c4bfdd7aef1738112f8cf7a7eb79605d00a889 Author: Marek Szymczak <marek.szymczak@oracle.com> Date: Wed Nov 30 14:19:44 2016 +0100 Bug#24493829 SETTING THE NULL_AUDIT_EVENT_RECORD CAUSES SEGMENTATION FAULT Problem: ======== null_audit_event_record variable is not intended to be modified outside of the null_audit plugin. null_audit_event_record buffer must be allocated/deallocated from within a plugin. Fix: ==== null_audit_event_record is read only variable. Reviewed-by: ============ Arun Kuruvila <arun.kuruvila@oracle.com> Georgi Kodinov <georgi.kodinov@oracle.com> mysql-test/r/audit_plugin_2.result | 14 ++++++++++++++ mysql-test/t/audit_plugin_2.test | 11 +++++++++++ plugin/audit_null/audit_null.c | 1 + 3 files changed, 26 insertions(+)