{"id":"CVE-2022-31621","details":"MariaDB Server before 10.7 is vulnerable to Denial of Service. In extra/mariabackup/ds_xbstream.cc, when an error occurs (stream_ctxt-\u003edest_file == NULL) while executing the method xbstream_open, the held lock is not released correctly, which allows local users to trigger a denial of service due to the deadlock. Note: The vendor argues this is just an improper locking bug and not a vulnerability with adverse effects.","aliases":["BIT-mariadb-2022-31621","BIT-mariadb-min-2022-31621","BIT-mysql-client-2022-31621"],"modified":"2026-04-12T02:56:50.134213Z","published":"2022-05-25T21:15:08.573Z","references":[{"type":"WEB","url":"https://jira.mariadb.org/browse/MDEV-26561"},{"type":"WEB","url":"https://jira.mariadb.org/browse/MDEV-26574"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220707-0006/"},{"type":"REPORT","url":"https://jira.mariadb.org/browse/MDEV-26574?filter=-2"},{"type":"FIX","url":"https://github.com/MariaDB/server/commit/b1351c15946349f9daa7e5297fb2ac6f3139e4a8"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mariadb/server","events":[{"introduced":"0"},{"fixed":"561b6c7e513abc4ceba263252b519bf715ce80f4"},{"introduced":"20ae591abd0bfe1bfaee546989ee163f4ef832b1"},{"fixed":"a2f147af35480e27bd599462db59b9b95f71acd9"},{"introduced":"c761b43451d54eeeecdf3c102906fcce88d4e9d9"},{"fixed":"a19ab67318760f8f155ef7f4f821dfc738542c67"},{"introduced":"7c7f9bef28aa566557da31402142f6dd8298ddd2"},{"fixed":"8635be6a2962f8e256c27836c35064ccaabb7486"},{"introduced":"1a647b700f6b72dc97211510a5d0c647d5d3d911"},{"fixed":"109fc67d4da46d52d2a96528eaea3b0ef6275692"},{"fixed":"b1351c15946349f9daa7e5297fb2ac6f3139e4a8"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"10.2.41"},{"introduced":"10.3.0"},{"fixed":"10.3.32"},{"introduced":"10.4.0"},{"fixed":"10.4.22"},{"introduced":"10.5.0"},{"fixed":"10.5.13"},{"introduced":"10.6.0"},{"fixed":"10.6.5"}]}}],"versions":["mariadb-10.1.0","mariadb-10.1.2","mariadb-10.1.3","mariadb-10.1.4","mariadb-10.1.5","mariadb-10.1.6","mariadb-10.1.7","mariadb-10.1.8","mariadb-10.2.0","mariadb-10.2.1","mariadb-10.2.10","mariadb-10.2.11","mariadb-10.2.12","mariadb-10.2.13","mariadb-10.2.14","mariadb-10.2.15","mariadb-10.2.16","mariadb-10.2.18","mariadb-10.2.19","mariadb-10.2.2","mariadb-10.2.20","mariadb-10.2.21","mariadb-10.2.22","mariadb-10.2.23","mariadb-10.2.24","mariadb-10.2.25","mariadb-10.2.26","mariadb-10.2.27","mariadb-10.2.28","mariadb-10.2.29","mariadb-10.2.30","mariadb-10.2.31","mariadb-10.2.39","mariadb-10.2.40","mariadb-10.2.5","mariadb-10.3.0","mariadb-10.3.1","mariadb-10.3.10","mariadb-10.3.12","mariadb-10.3.16","mariadb-10.3.17","mariadb-10.3.18","mariadb-10.3.19","mariadb-10.3.2","mariadb-10.3.20","mariadb-10.3.21","mariadb-10.3.26","mariadb-10.3.30","mariadb-10.3.31","mariadb-10.3.4","mariadb-10.3.5","mariadb-10.3.6","mariadb-10.3.7","mariadb-10.4.10","mariadb-10.4.11","mariadb-10.4.20","mariadb-10.4.21","mariadb-10.4.3","mariadb-10.4.4","mariadb-10.4.5","mariadb-10.4.7","mariadb-10.4.9","mariadb-10.5.0","mariadb-10.5.11","mariadb-10.5.12","mariadb-10.5.2","mariadb-10.5.4","mariadb-10.6.0","mariadb-10.6.1","mariadb-10.6.2","mariadb-10.6.3","mariadb-10.6.4"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31621.json","vanir_signatures_modified":"2026-04-12T02:56:50Z","vanir_signatures":[{"id":"CVE-2022-31621-0f0e4c3d","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"line_hashes":["131649957694533731721940309055820975752","249452647439853322414702137565205958351","201969777012246482841882403852745931746","95578070551738783324854304889376330162","249398730562238721197312579126910521732","272906839712165971131454335608419438521","107318663712936600961191413243544821067","180839139384475678538465324643300020059","282394023504767334221966027397455256851"],"threshold":0.9},"signature_type":"Line","deprecated":false,"target":{"file":"sql/sp_head.cc"}},{"id":"CVE-2022-31621-658f461a","source":"https://github.com/mariadb/server/commit/b1351c15946349f9daa7e5297fb2ac6f3139e4a8","signature_version":"v1","digest":{"function_hash":"233059734358559211299288846435812335016","length":1007},"signature_type":"Function","deprecated":false,"target":{"function":"xbstream_open","file":"extra/mariabackup/ds_xbstream.cc"}},{"id":"CVE-2022-31621-a5b111ca","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"line_hashes":["246197311705367672488779414942418338437","276461508094209904860358154457724219596","119856287420192600807656416768471292892","307523178086602816378726753514303591471"],"threshold":0.9},"signature_type":"Line","deprecated":false,"target":{"file":"sql/sql_class.h"}},{"id":"CVE-2022-31621-c0b6a67c","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"function_hash":"313645379892638120418940088368384842330","length":526},"signature_type":"Function","deprecated":false,"target":{"function":"trans_cannot_safely_rollback","file":"sql/log.cc"}},{"id":"CVE-2022-31621-c2087e13","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"function_hash":"58969679078610265830587969385269203468","length":5738},"signature_type":"Function","deprecated":false,"target":{"function":"MYSQL_BIN_LOG::write","file":"sql/log.cc"}},{"id":"CVE-2022-31621-c7e73326","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"function_hash":"306699274100027957454330329145370130558","length":1646},"signature_type":"Function","deprecated":false,"target":{"function":"binlog_rollback","file":"sql/log.cc"}},{"id":"CVE-2022-31621-cbcd0de0","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"line_hashes":["37241440461655139304666183504430673984","321123901233127987586838407173769763021","72261390377549520472738172439120219059","177685578562853608336609164621767055897","89819371651002091070891492658372534238","51099385615472244965869900895991310181","46580225994766933062920841006192426125","315917086551178982883049352244998712855","151578589657138643687922568393137771305","17554905964382256978464037543366371516","44471072352567830517014260687216170718","24734019721218526304965298857312980362","170961031791040395953313676921959415915","270863138330118960816828040809003942807","193741668719766893391486278801760873722","187930135527712657567073811467820013048","463263057525947197303571514490382636","339713228808563234771781256013265010488","60867587337001395239385720816441536057","201702182182638939619765504430616936017","57432871140975116606615382999074109620","84713255884193508387326659336658799628","26176627625780710469062407865406490363","43796184043138950845306782231229762899","324404121552377421361400005592716783209","327933765027016333514108949053193264778","64468012293600814982757536651285167827","7202594327949745606575738191994274437","262509239196084693497735668412073064246","337977078646117299838774945463804836390","10862040297338291254194597838720262756","83515971079454692103282106460082729171","189738111660857520124962685258236418556","32778699285218945562928993184558074443","218701964979892061313721302653462012734","187533463339481117482532077546372282049","202341581865934325003292198703136040956","155258852623302621764107560349238231581","159919742848761288642405190297761552689","147668741816814608585313009494181079624","218818688557001123571703121311150830495","148772925594895409927511713164729652512","95985790907239484288997369415539433967","255840666226744218838219627455521697435","255600561411523879536850015147493893481","27747137695801633233169226083338797085"],"threshold":0.9},"signature_type":"Line","deprecated":false,"target":{"file":"sql/log.cc"}},{"id":"CVE-2022-31621-cc00cf28","source":"https://github.com/mariadb/server/commit/b1351c15946349f9daa7e5297fb2ac6f3139e4a8","signature_version":"v1","digest":{"line_hashes":["167890560750701249489896219944202062762","268209796903344293356828286368688664967","169090813138370863555020065431270480309","337301460284207515514171628811139409466","224285923433873354564135012931937624238","12574186095871248775478581113365792649","260444992083677766809408272545037606041","186684390169372545720783369881229367474","253902093367623374329398104205023669406","245165555784708798433836005376697887396","281626662535726214097872739291335754844"],"threshold":0.9},"signature_type":"Line","deprecated":false,"target":{"file":"extra/mariabackup/ds_xbstream.cc"}},{"id":"CVE-2022-31621-cd9394d7","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"line_hashes":["119521046618748345254444704918727070434","200452323826260590731762179699296029024","251509020612362925913253356211500341353","261751524541214367584170806104141027470","201306130400997636080714619460096506715","35155932094167429544231535939915658820"],"threshold":0.9},"signature_type":"Line","deprecated":false,"target":{"file":"sql/handler.h"}},{"id":"CVE-2022-31621-ed8021c5","source":"https://github.com/mariadb/server/commit/561b6c7e513abc4ceba263252b519bf715ce80f4","signature_version":"v1","digest":{"function_hash":"336328390458211521927718962871514707351","length":2658},"signature_type":"Function","deprecated":false,"target":{"function":"sp_lex_keeper::reset_lex_and_exec_core","file":"sql/sp_head.cc"}}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}