Ubuntu 20.04 LTS : MariaDB vulnerabilities (USN-5305-1)

high Nessus Plugin ID 158456

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 20.04 LTS / 21.10 host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-5305-1 advisory.

- MariaDB before 10.7.2 allows an application crash because it does not recognize that SELECT_LEX::nest_level is local to each VIEW. (CVE-2021-46659)

- MariaDB through 10.5.9 allows an application crash in find_field_in_tables and find_order_in_list via an unused common table expression (CTE). (CVE-2021-46661)

- MariaDB through 10.5.13 allows a ha_maria::extra application crash via certain SELECT statements.
(CVE-2021-46663)

- MariaDB through 10.5.9 allows an application crash in sub_select_postjoin_aggr for a NULL value of aggr.
(CVE-2021-46664)

- MariaDB through 10.5.9 allows a sql_parse.cc application crash because of incorrect used_tables expectations. (CVE-2021-46665)

- MariaDB through 10.5.9 allows an application crash via certain long SELECT DISTINCT statements that improperly interact with storage-engine resource limitations for temporary data structures.
(CVE-2021-46668)

- MariaDB CONNECT Storage Engine Stack-based Buffer Overflow Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of MariaDB.
Authentication is required to exploit this vulnerability. The specific flaw exists within the processing of SQL queries. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the service account. Was ZDI-CAN-16191.
(CVE-2022-24048)

- MariaDB CONNECT Storage Engine Use-After-Free Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of MariaDB. Authentication is required to exploit this vulnerability. The specific flaw exists within the processing of SQL queries. The issue results from the lack of validating the existence of an object prior to performing operations on the object. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the service account. Was ZDI-CAN-16207. (CVE-2022-24050)

- MariaDB CONNECT Storage Engine Format String Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of MariaDB. Authentication is required to exploit this vulnerability. The specific flaw exists within the processing of SQL queries. The issue results from the lack of proper validation of a user-supplied string before using it as a format specifier. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the service account. Was ZDI-CAN-16193. (CVE-2022-24051)

- MariaDB CONNECT Storage Engine Heap-based Buffer Overflow Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of MariaDB.
Authentication is required to exploit this vulnerability. The specific flaw exists within the processing of SQL queries. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length heap-based buffer. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the service account. Was ZDI-CAN-16190.
(CVE-2022-24052)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Update the affected packages.

See Also

https://ubuntu.com/security/notices/USN-5305-1

Plugin Details

Severity: High

ID: 158456

File Name: ubuntu_USN-5305-1.nasl

Version: 1.5

Type: local

Agent: unix

Published: 2/28/2022

Updated: 10/20/2023

Supported Sensors: Agentless Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Frictionless Assessment Azure, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: Medium

Base Score: 4.6

Temporal Score: 3.6

Vector: CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-24052

CVSS v3

Risk Factor: High

Base Score: 7.8

Temporal Score: 7

Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:canonical:ubuntu_linux:libmariadb-dev, p-cpe:/a:canonical:ubuntu_linux:libmariadb-dev-compat, p-cpe:/a:canonical:ubuntu_linux:libmariadb3, p-cpe:/a:canonical:ubuntu_linux:libmariadbclient-dev, p-cpe:/a:canonical:ubuntu_linux:libmariadbd-dev, p-cpe:/a:canonical:ubuntu_linux:libmariadbd19, p-cpe:/a:canonical:ubuntu_linux:mariadb-backup, p-cpe:/a:canonical:ubuntu_linux:mariadb-client, p-cpe:/a:canonical:ubuntu_linux:mariadb-client-10.3, p-cpe:/a:canonical:ubuntu_linux:mariadb-client-core-10.3, p-cpe:/a:canonical:ubuntu_linux:mariadb-common, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-connect, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-cracklib-password-check, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-gssapi-client, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-gssapi-server, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-mroonga, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-oqgraph, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-rocksdb, cpe:/o:canonical:ubuntu_linux:20.04:-:lts, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-spider, p-cpe:/a:canonical:ubuntu_linux:mariadb-plugin-tokudb, p-cpe:/a:canonical:ubuntu_linux:mariadb-server, p-cpe:/a:canonical:ubuntu_linux:mariadb-server-10.3, p-cpe:/a:canonical:ubuntu_linux:mariadb-server-core-10.3, p-cpe:/a:canonical:ubuntu_linux:mariadb-test, p-cpe:/a:canonical:ubuntu_linux:mariadb-test-data

Required KB Items: Host/cpu, Host/Ubuntu, Host/Ubuntu/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2/28/2022

Vulnerability Publication Date: 1/29/2022

Reference Information

CVE: CVE-2021-46659, CVE-2021-46661, CVE-2021-46663, CVE-2021-46664, CVE-2021-46665, CVE-2021-46668, CVE-2022-24048, CVE-2022-24050, CVE-2022-24051, CVE-2022-24052

USN: 5305-1