Lucene search

K
nessusUbuntu Security Notice (C) 2023 Canonical, Inc. / NASL script (C) 2023 and is owned by Tenable, Inc. or an Affiliate thereof.UBUNTU_USN-4770-1.NASL
HistoryOct 21, 2023 - 12:00 a.m.

Ubuntu 16.04 ESM / 18.04 ESM : GlusterFS vulnerabilities (USN-4770-1)

2023-10-2100:00:00
Ubuntu Security Notice (C) 2023 Canonical, Inc. / NASL script (C) 2023 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
7
ubuntu
glusterfs
vulnerabilities
usn-4770-1
denial of service
privilege escalation
code execution
information disclosure
path traversal
memory leak
remote denial of service

The remote Ubuntu 16.04 ESM / 18.04 ESM host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-4770-1 advisory.

  • The __socket_proto_state_machine function in GlusterFS 3.5 allows remote attackers to cause a denial of service (infinite loop) via a 00000000 fragment header. (CVE-2014-3619)

  • glusterfs is vulnerable to privilege escalation on gluster server nodes. An authenticated gluster client via TLS could use gluster cli with --remote-host command to add it self to trusted storage pool and perform privileged gluster operations like adding other machines to trusted storage pool, start, stop, and delete volumes. (CVE-2018-10841)

  • A privilege escalation flaw was found in gluster 3.x snapshot scheduler. Any gluster client allowed to mount gluster volumes could also mount shared gluster storage volume and escalate privileges by scheduling malicious cronjob via symlink. (CVE-2018-1088)

  • It was found that glusterfs server does not properly sanitize file paths in the trusted.io-stats-dump extended attribute which is used by the debug/io-stats translator. Attacker can use this flaw to create files and execute arbitrary code. To exploit this attacker would require sufficient access to modify the extended attributes of files on a gluster volume. (CVE-2018-10904)

  • It was found that glusterfs server is vulnerable to multiple stack based buffer overflows due to functions in server-rpc-fopc.c allocating fixed size buffers using ‘alloca(3)’. An authenticated attacker could exploit this by mounting a gluster volume and sending a string longer that the fixed buffer size to cause crash or potential code execution. (CVE-2018-10907)

  • A flaw was found in the way dic_unserialize function of glusterfs does not handle negative key length values. An attacker could use this flaw to read memory from other locations into the stored dict value.
    (CVE-2018-10911)

  • An information disclosure vulnerability was discovered in glusterfs server. An attacker could issue a xattr request via glusterfs FUSE to determine the existence of any file. (CVE-2018-10913)

  • It was found that an attacker could issue a xattr request via glusterfs FUSE to cause gluster brick process to crash which will result in a remote denial of service. If gluster multiplexing is enabled this will result in a crash of multiple bricks and gluster volumes. (CVE-2018-10914)

  • It was found that the mknod call derived from mknod(2) can create files pointing to devices on a glusterfs server node. An authenticated attacker could use this to create an arbitrary device and read data from any device attached to the glusterfs server node. (CVE-2018-10923)

  • It was discovered that fsync(2) system call in glusterfs client code leaks memory. An authenticated attacker could use this flaw to launch a denial of service attack by making gluster clients consume memory of the host machine. (CVE-2018-10924)

  • A flaw was found in RPC request using gfs3_mknod_req supported by glusterfs server. An authenticated attacker could use this flaw to write files to an arbitrary location via path traversal and execute arbitrary code on a glusterfs server node. (CVE-2018-10926)

  • A flaw was found in RPC request using gfs3_lookup_req in glusterfs server. An authenticated attacker could use this flaw to leak information and execute remote denial of service by crashing gluster brick process.
    (CVE-2018-10927)

  • A flaw was found in RPC request using gfs3_symlink_req in glusterfs server which allows symlink destinations to point to file paths outside of the gluster volume. An authenticated attacker could use this flaw to create arbitrary symlinks pointing anywhere on the server and execute arbitrary code on glusterfs server nodes. (CVE-2018-10928)

  • A flaw was found in RPC request using gfs2_create_req in glusterfs server. An authenticated attacker could use this flaw to create arbitrary files and execute arbitrary code on glusterfs server nodes.
    (CVE-2018-10929)

  • A flaw was found in RPC request using gfs3_rename_req in glusterfs server. An authenticated attacker could use this flaw to write to a destination outside the gluster volume. (CVE-2018-10930)

  • It was found that the fix for CVE-2018-10927, CVE-2018-10928, CVE-2018-10929, CVE-2018-10930, and CVE-2018-10926 was incomplete. A remote, authenticated attacker could use one of these flaws to execute arbitrary code, create arbitrary files, or cause denial of service on glusterfs server nodes via symlinks to relative paths. (CVE-2018-14651)

  • The Gluster file system through versions 3.12 and 4.1.4 is vulnerable to a buffer overflow in the ‘features/index’ translator via the code handling the ‘GF_XATTR_CLRLK_CMD’ xattr in the ‘pl_getxattr’ function. A remote authenticated attacker could exploit this on a mounted volume to cause a denial of service. (CVE-2018-14652)

  • The Gluster file system through versions 4.1.4 and 3.12 is vulnerable to a heap-based buffer overflow in the ‘__server_getspec’ function via the ‘gf_getspec_req’ RPC message. A remote authenticated attacker could exploit this to cause a denial of service or other potential unspecified impact. (CVE-2018-14653)

  • The Gluster file system through version 4.1.4 is vulnerable to abuse of the ‘features/index’ translator. A remote attacker with access to mount volumes could exploit this via the ‘GF_XATTROP_ENTRY_IN_KEY’ xattrop to create arbitrary, empty files on the target server. (CVE-2018-14654)

  • The Gluster file system through versions 4.1.4 and 3.1.2 is vulnerable to a denial of service attack via use of the ‘GF_XATTR_IOSTATS_DUMP_KEY’ xattr. A remote, authenticated attacker could exploit this by mounting a Gluster volume and repeatedly calling ‘setxattr(2)’ to trigger a state dump and create an arbitrary number of files in the server’s runtime directory. (CVE-2018-14659)

  • A flaw was found in glusterfs server through versions 4.1.4 and 3.1.2 which allowed repeated usage of GF_META_LOCK_KEY xattr. A remote, authenticated attacker could use this flaw to create multiple locks for single inode by using setxattr repetitively resulting in memory exhaustion of glusterfs server node.
    (CVE-2018-14660)

  • It was found that usage of snprintf function in feature/locks translator of glusterfs server 3.8.4, as shipped with Red Hat Gluster Storage, was vulnerable to a format string attack. A remote, authenticated attacker could use this flaw to cause remote denial of service. (CVE-2018-14661)

Note that Nessus has not tested for these issues but has instead relied only on the application’s self-reported version number.

#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Ubuntu Security Notice USN-4770-1. The text
# itself is copyright (C) Canonical, Inc. See
# <https://ubuntu.com/security/notices>. Ubuntu(R) is a registered
# trademark of Canonical, Inc.
##

include('compat.inc');

if (description)
{
  script_id(183640);
  script_version("1.0");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/10/21");

  script_cve_id(
    "CVE-2014-3619",
    "CVE-2018-1088",
    "CVE-2018-10841",
    "CVE-2018-10904",
    "CVE-2018-10907",
    "CVE-2018-10911",
    "CVE-2018-10913",
    "CVE-2018-10914",
    "CVE-2018-10923",
    "CVE-2018-10924",
    "CVE-2018-10926",
    "CVE-2018-10927",
    "CVE-2018-10928",
    "CVE-2018-10929",
    "CVE-2018-10930",
    "CVE-2018-14651",
    "CVE-2018-14652",
    "CVE-2018-14653",
    "CVE-2018-14654",
    "CVE-2018-14659",
    "CVE-2018-14660",
    "CVE-2018-14661"
  );
  script_xref(name:"USN", value:"4770-1");

  script_name(english:"Ubuntu 16.04 ESM / 18.04 ESM : GlusterFS vulnerabilities (USN-4770-1)");

  script_set_attribute(attribute:"synopsis", value:
"The remote Ubuntu host is missing one or more security updates.");
  script_set_attribute(attribute:"description", value:
"The remote Ubuntu 16.04 ESM / 18.04 ESM host has packages installed that are affected by multiple vulnerabilities as
referenced in the USN-4770-1 advisory.

  - The __socket_proto_state_machine function in GlusterFS 3.5 allows remote attackers to cause a denial of
    service (infinite loop) via a 00000000 fragment header. (CVE-2014-3619)

  - glusterfs is vulnerable to privilege escalation on gluster server nodes. An authenticated gluster client
    via TLS could use gluster cli with --remote-host command to add it self to trusted storage pool and
    perform privileged gluster operations like adding other machines to trusted storage pool, start, stop, and
    delete volumes. (CVE-2018-10841)

  - A privilege escalation flaw was found in gluster 3.x snapshot scheduler. Any gluster client allowed to
    mount gluster volumes could also mount shared gluster storage volume and escalate privileges by scheduling
    malicious cronjob via symlink. (CVE-2018-1088)

  - It was found that glusterfs server does not properly sanitize file paths in the trusted.io-stats-dump
    extended attribute which is used by the debug/io-stats translator. Attacker can use this flaw to create
    files and execute arbitrary code. To exploit this attacker would require sufficient access to modify the
    extended attributes of files on a gluster volume. (CVE-2018-10904)

  - It was found that glusterfs server is vulnerable to multiple stack based buffer overflows due to functions
    in server-rpc-fopc.c allocating fixed size buffers using 'alloca(3)'. An authenticated attacker could
    exploit this by mounting a gluster volume and sending a string longer that the fixed buffer size to cause
    crash or potential code execution. (CVE-2018-10907)

  - A flaw was found in the way dic_unserialize function of glusterfs does not handle negative key length
    values. An attacker could use this flaw to read memory from other locations into the stored dict value.
    (CVE-2018-10911)

  - An information disclosure vulnerability was discovered in glusterfs server. An attacker could issue a
    xattr request via glusterfs FUSE to determine the existence of any file. (CVE-2018-10913)

  - It was found that an attacker could issue a xattr request via glusterfs FUSE to cause gluster brick
    process to crash which will result in a remote denial of service. If gluster multiplexing is enabled this
    will result in a crash of multiple bricks and gluster volumes. (CVE-2018-10914)

  - It was found that the mknod call derived from mknod(2) can create files pointing to devices on a
    glusterfs server node. An authenticated attacker could use this to create an arbitrary device and read
    data from any device attached to the glusterfs server node. (CVE-2018-10923)

  - It was discovered that fsync(2) system call in glusterfs client code leaks memory. An authenticated
    attacker could use this flaw to launch a denial of service attack by making gluster clients consume memory
    of the host machine. (CVE-2018-10924)

  - A flaw was found in RPC request using gfs3_mknod_req supported by glusterfs server. An authenticated
    attacker could use this flaw to write files to an arbitrary location via path traversal and execute
    arbitrary code on a glusterfs server node. (CVE-2018-10926)

  - A flaw was found in RPC request using gfs3_lookup_req in glusterfs server. An authenticated attacker could
    use this flaw to leak information and execute remote denial of service by crashing gluster brick process.
    (CVE-2018-10927)

  - A flaw was found in RPC request using gfs3_symlink_req in glusterfs server which allows symlink
    destinations to point to file paths outside of the gluster volume. An authenticated attacker could use
    this flaw to create arbitrary symlinks pointing anywhere on the server and execute arbitrary code on
    glusterfs server nodes. (CVE-2018-10928)

  - A flaw was found in RPC request using gfs2_create_req in glusterfs server. An authenticated attacker could
    use this flaw to create arbitrary files and execute arbitrary code on glusterfs server nodes.
    (CVE-2018-10929)

  - A flaw was found in RPC request using gfs3_rename_req in glusterfs server. An authenticated attacker could
    use this flaw to write to a destination outside the gluster volume. (CVE-2018-10930)

  - It was found that the fix for CVE-2018-10927, CVE-2018-10928, CVE-2018-10929, CVE-2018-10930, and
    CVE-2018-10926 was incomplete. A remote, authenticated attacker could use one of these flaws to execute
    arbitrary code, create arbitrary files, or cause denial of service on glusterfs server nodes via symlinks
    to relative paths. (CVE-2018-14651)

  - The Gluster file system through versions 3.12 and 4.1.4 is vulnerable to a buffer overflow in the
    'features/index' translator via the code handling the 'GF_XATTR_CLRLK_CMD' xattr in the 'pl_getxattr'
    function. A remote authenticated attacker could exploit this on a mounted volume to cause a denial of
    service. (CVE-2018-14652)

  - The Gluster file system through versions 4.1.4 and 3.12 is vulnerable to a heap-based buffer overflow in
    the '__server_getspec' function via the 'gf_getspec_req' RPC message. A remote authenticated attacker
    could exploit this to cause a denial of service or other potential unspecified impact. (CVE-2018-14653)

  - The Gluster file system through version 4.1.4 is vulnerable to abuse of the 'features/index' translator. A
    remote attacker with access to mount volumes could exploit this via the 'GF_XATTROP_ENTRY_IN_KEY' xattrop
    to create arbitrary, empty files on the target server. (CVE-2018-14654)

  - The Gluster file system through versions 4.1.4 and 3.1.2 is vulnerable to a denial of service attack via
    use of the 'GF_XATTR_IOSTATS_DUMP_KEY' xattr. A remote, authenticated attacker could exploit this by
    mounting a Gluster volume and repeatedly calling 'setxattr(2)' to trigger a state dump and create an
    arbitrary number of files in the server's runtime directory. (CVE-2018-14659)

  - A flaw was found in glusterfs server through versions 4.1.4 and 3.1.2 which allowed repeated usage of
    GF_META_LOCK_KEY xattr. A remote, authenticated attacker could use this flaw to create multiple locks for
    single inode by using setxattr repetitively resulting in memory exhaustion of glusterfs server node.
    (CVE-2018-14660)

  - It was found that usage of snprintf function in feature/locks translator of glusterfs server 3.8.4, as
    shipped with Red Hat Gluster Storage, was vulnerable to a format string attack. A remote, authenticated
    attacker could use this flaw to cause remote denial of service. (CVE-2018-14661)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version
number.");
  script_set_attribute(attribute:"see_also", value:"https://ubuntu.com/security/notices/USN-4770-1");
  script_set_attribute(attribute:"solution", value:
"Update the affected glusterfs-client, glusterfs-common and / or glusterfs-server packages.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:N/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-14654");
  script_set_attribute(attribute:"cvss3_score_source", value:"CVE-2018-14653");

  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/09/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/03/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2023/10/21");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:16.04:-:esm");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:18.04:-:esm");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:glusterfs-client");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:glusterfs-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:glusterfs-server");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Ubuntu Local Security Checks");

  script_copyright(english:"Ubuntu Security Notice (C) 2023 Canonical, Inc. / NASL script (C) 2023 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");

  exit(0);
}

include('debian_package.inc');

if ( ! get_kb_item('Host/local_checks_enabled') ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
var os_release = get_kb_item('Host/Ubuntu/release');
if ( isnull(os_release) ) audit(AUDIT_OS_NOT, 'Ubuntu');
os_release = chomp(os_release);
if (! ('16.04' >< os_release || '18.04' >< os_release)) audit(AUDIT_OS_NOT, 'Ubuntu 16.04 / 18.04', 'Ubuntu ' + os_release);
if ( ! get_kb_item('Host/Debian/dpkg-l') ) audit(AUDIT_PACKAGE_LIST_MISSING);

var cpu = get_kb_item('Host/cpu');
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ('x86_64' >!< cpu && cpu !~ "^i[3-6]86$" && 's390' >!< cpu && 'aarch64' >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, 'Ubuntu', cpu);

var pkgs = [
    {'osver': '16.04', 'pkgname': 'glusterfs-client', 'pkgver': '3.7.6-1ubuntu1+esm1'},
    {'osver': '16.04', 'pkgname': 'glusterfs-common', 'pkgver': '3.7.6-1ubuntu1+esm1'},
    {'osver': '16.04', 'pkgname': 'glusterfs-server', 'pkgver': '3.7.6-1ubuntu1+esm1'},
    {'osver': '18.04', 'pkgname': 'glusterfs-client', 'pkgver': '3.13.2-1ubuntu1+esm1'},
    {'osver': '18.04', 'pkgname': 'glusterfs-common', 'pkgver': '3.13.2-1ubuntu1+esm1'},
    {'osver': '18.04', 'pkgname': 'glusterfs-server', 'pkgver': '3.13.2-1ubuntu1+esm1'}
];

var flag = 0;
foreach package_array ( pkgs ) {
  var osver = NULL;
  var pkgname = NULL;
  var pkgver = NULL;
  if (!empty_or_null(package_array['osver'])) osver = package_array['osver'];
  if (!empty_or_null(package_array['pkgname'])) pkgname = package_array['pkgname'];
  if (!empty_or_null(package_array['pkgver'])) pkgver = package_array['pkgver'];
  if (osver && pkgname && pkgver) {
    if (ubuntu_check(osver:osver, pkgname:pkgname, pkgver:pkgver)) flag++;
  }
}

if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : ubuntu_report_get()
  );
  exit(0);
}
else
{
  var tested = ubuntu_pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, 'glusterfs-client / glusterfs-common / glusterfs-server');
}
VendorProductVersionCPE
canonicalubuntu_linux16.04cpe:/o:canonical:ubuntu_linux:16.04:-:esm
canonicalubuntu_linux18.04cpe:/o:canonical:ubuntu_linux:18.04:-:esm
canonicalubuntu_linuxglusterfs-clientp-cpe:/a:canonical:ubuntu_linux:glusterfs-client
canonicalubuntu_linuxglusterfs-commonp-cpe:/a:canonical:ubuntu_linux:glusterfs-common
canonicalubuntu_linuxglusterfs-serverp-cpe:/a:canonical:ubuntu_linux:glusterfs-server

References