Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1168485 - (CVE-2014-9114) CVE-2014-9114 util-linux: command injection flaw in blkid
CVE-2014-9114 util-linux: command injection flaw in blkid
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20141126,repor...
: Security
Depends On: 1168490
Blocks: 1168492
  Show dependency treegraph
 
Reported: 2014-11-27 01:04 EST by Murray McAllister
Modified: 2015-10-19 08:39 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-22 06:14:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Murray McAllister 2014-11-27 01:04:55 EST
Sebastian Krahmer reported a command injection flaw in blkid. This could possibly result in command execution with root privileges (for example, when running blkid on a malicious USB drive):

http://www.openwall.com/lists/oss-security/2014/11/26/13
Comment 1 Murray McAllister 2014-11-27 01:21:58 EST
Created util-linux tracking bugs for this issue:

Affects: fedora-all [bug 1168490]
Comment 2 Murray McAllister 2014-11-27 01:23:14 EST
Tested on Fedora, seems it will be affected. I am not aware of any patches.
Comment 3 Karel Zak 2014-11-27 04:23:54 EST
(In reply to Murray McAllister from comment #0)
> Sebastian Krahmer reported a command injection flaw in blkid. This could
> possibly result in command execution with root privileges (for example, when
> running blkid on a malicious USB drive):
> 
> http://www.openwall.com/lists/oss-security/2014/11/26/13

This is not true, udev never ever call "blkid -o udev", it always call blkid command with -p to *avoid* blkid cache usage.
Comment 4 Karel Zak 2014-11-27 07:21:17 EST
And we don't use blkid binary in recent udevd at all, it's directly linked with  libblkid and it does not use cached results at all.
Comment 5 Karel Zak 2014-11-27 08:12:58 EST
Fixed in upstream tree, commit:

https://github.com/karelzak/util-linux/commit/89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc
Comment 6 Murray McAllister 2014-11-27 08:18:35 EST
(In reply to Karel Zak from comment #5)
> Fixed in upstream tree, commit:
> 
> https://github.com/karelzak/util-linux/commit/
> 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc

Hi Karel,

Thank you for the info and patch!
Comment 7 Ján Rusnačko 2014-12-01 16:33:42 EST
RHEL 5 is not affected by this, as blkid does not have option to format output as key=value to be eval`d. Only permitted options are value, device and full.

RHEL 6 is affected. As Karel mentioned, udev calls with -p, so the only suspicious call I found is in dracut-functions:

    138 get_fs_env() {
    139     if [[ -x /lib/udev/vol_id ]]; then
    140 	eval $(/lib/udev/vol_id --export $1)
    141     elif find_binary blkid >/dev/null; then
    142 	eval $(blkid -o udev $1)
    143     else
    144 	return 1
    145     fi
    146 }

To trigger this code, one has to call `dracut --hostonly`, which forces sequential scan of entries in /proc/mounts. The scan continues until it finds entry which corresponds to /. Each entry passes through get_fs_env(), so if any of the devices up to and including / in /proc/mounts contain filesystem with malicious label, running dracut with hostonly would result in execution of command in malicious label. Content in /proc/mounts is appended, so malicious USB should not be an issue.

RHEL 7 is affected, but I haven`t found any code which would eval the output from blkid -o udev.
Comment 11 Fedora Update System 2014-12-04 01:24:13 EST
util-linux-2.24.2-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2014-12-14 23:33:45 EST
util-linux-2.25.2-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Ján Rusnačko 2015-10-19 08:39:12 EDT
Statement:

This issue affects the versions of util-linux as shipped with Red Hat Enterprise Linux 6 and 7. Red Hat Product Security has rated this issue as having Moderate security impact. Because exploitability of this issue requires conditions unlikely to occur, this issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

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