1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-35852 : ASAN heap-use-after-free in WSREP_DEBUG after INSERT DELAYED

Problem was that in case of INSERT DELAYED thd->query() is
freed before we call trans_rollback where WSREP_DEBUG
could access thd->query() in wsrep_thd_query().

Fix is to reset thd->query() to NULL in delayed_insert
destructor after it is freed. There is already
null guard at wsrep_thd_query().

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
Jan Lindström
2025-01-15 09:44:30 +02:00
committed by Julius Goryavsky
parent cbb24d9aa5
commit 43c36b3c88
6 changed files with 33 additions and 6 deletions

View File

@ -2421,6 +2421,7 @@ public:
delayed_insert_threads--;
my_free(thd.query());
thd.reset_query_inner();
thd.security_ctx->user= 0;
thd.security_ctx->host= 0;
}