Bug 614248 - (CVE-2010-2526) CVE-2010-2526 lvm2-cluster: insecurity when communicating between lvm2 and clvmd
CVE-2010-2526 lvm2-cluster: insecurity when communicating between lvm2 and clvmd
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 616044 616047 616053 616148 616150 616151 616153 616155 616521 619047
  Show dependency treegraph
Reported: 2010-07-13 18:55 EDT by Vincent Danen
Modified: 2013-04-04 17:44 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 616044 (view as bug list)
Last Closed: 2013-04-04 17:44:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Upstream patch to fix this issue. (8.08 KB, patch)
2010-07-21 09:08 EDT, Alasdair Kergon
no flags Details | Diff
Upstream patch to fix this issue. (8.07 KB, patch)
2010-07-28 07:06 EDT, Alasdair Kergon
no flags Details | Diff

  None (edit)
Description Vincent Danen 2010-07-13 18:55:32 EDT
During some routine code review last week, Alasdair Kergon spotted a security flaw in the clustered LVM daemon, clvmd.  The report from him is as follows:

Clvmd, a privileged process, accepts, acts upon and responds to communications from unprivileged processes.

Background information

clvmd belongs to the lvm2-cluster package and as such is normally used in shared storage clusters, where several machines are using the same disks in parallel. It is run on every machine in such a cluster. The daemon has to be enabled explictly after installing the package: it does not run by default (since RHEL4.5). Systems not running the daemon i.e. most LVM systems, not subscribed to RHN clustering channels, are not vulnerable.

Clvmd has three roles that require root privilege:

(1) Communicate with clvmd processes on other machines;

(2) Hold locks to ensure conflicting commands are not run in parallel;

(3) Make Logical Volumes available for use on the local machine by issuing the appropriate device-mapper ioctls to the kernel.

When a LVM command is issued in a cluster, an instruction is sent to the local clvmd to obtain the necessary locks and to activate or deactivate logical volumes. Any changes to the on-disk LVM metadata are performed by the original LVM process - not by clvmd itself - and then the instance of clvmd on each machine reads the updated metadata independently from disk.

The flaw

The problem was caused by an upstream commit made in April 2004. Prior to that, the communication between lvm and clvmd was through a socket in the filesystem, so it was protected by standard file-system security mechanisms. The commit in question changed it to use an abstract socket starting with a NUL byte (see 'man 7 unix') but no attempt was made to secure it by exchanging credentials. Consequently an unprivileged process can instruct clvmd to perform operations that were supposed to be available only to root.

Operations available to an attacker:

(1) Instruct clvmd to suspend the use of any Logical Volume visible to any machine in the cluster with immediate effect.

(2) Instruct clvmd to activate, deactivate or reload any Logical Volume visible to any machine in the cluster. (Deactivation will fail if the Logical Volume is in use.)

(3) Instruct clvmd to die.

(4) Instruct clvmd to restart (versions 2.02.64 and later).

(5) Instruct clvmd to obtain, release or report the state of locks held by the daemon.

(6) Enable/disable clvmd's debugging mode which controls the amount of detail it logs.

(7) Instruct clvmd to create a backup of a Volume Group's metadata on all the other nodes.

(8) Instruct clvmd to report the cluster name.

(9) Instruct clvmd to echo back the command it received.

(10) Instruct clvmd to refresh its internal caches.

Several of these involve performing privileged operations and could impact upon service availability on machines belonging to the cluster.

The fix
We are reverting to using a pathname for the socket and relying upon standard filesystem security.
Comment 10 Vincent Danen 2010-07-14 11:02:57 EDT
This issue has been assigned the name CVE-2010-2526.
Comment 46 errata-xmlrpc 2010-07-28 09:28:33 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0567 https://rhn.redhat.com/errata/RHSA-2010-0567.html
Comment 47 errata-xmlrpc 2010-07-28 09:45:35 EDT
This issue has been addressed in following products:

  GFS  for RHEL 4

Via RHSA-2010:0568 https://rhn.redhat.com/errata/RHSA-2010-0568.html

Note You need to log in before you can comment on or make changes to this bug.