Bug 593226 - (CVE-2010-1636) CVE-2010-1636 kernel: btrfs: check for read permission on src file in the clone ioctl
CVE-2010-1636 kernel: btrfs: check for read permission on src file in the clo...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 593227
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-18 05:02 EDT by Eugene Teo (Security Response)
Modified: 2012-03-28 04:46 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-28 04:46:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
exploit.c (443 bytes, text/x-csrc)
2010-05-18 21:16 EDT, Eugene Teo (Security Response)
no flags Details

  None (edit)
Description Eugene Teo (Security Response) 2010-05-18 05:02:16 EDT
Description of problem:
The existing [btrfs] code would have allowed you to clone a file that was only open for writing. Not an expected behaviour.

Upstream commit:
http://git.kernel.org/linus/5dc6416414fb3ec6e2825fd4d20c8bf1d7fe0395

Reference:
https://btrfs.wiki.kernel.org/index.php/Main_Page

The kernel in Red Hat Enterprise Linux 6 has support for Btrfs by default.

Acknowledgements:

Red Hat would like to thank Dan Rosenberg for responsibly reporting this issue.
Comment 2 Eugene Teo (Security Response) 2010-05-18 05:11:09 EDT
Statement:

Not vulnerable. This issue did not affect the versions of Linux kernel as shipped with Red Hat Enterprise Linux 3, 4, 5 and Red Hat Enterprise MRG as they did not include support for Btrfs, a new copy on write filesystem.
Comment 3 Eugene Teo (Security Response) 2010-05-18 21:16:07 EDT
Created attachment 414994 [details]
exploit.c

The steps to reproduce the issue and exploit.c were made publicly available in: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/579585

$ dd if=/dev/zero of=fs.iso bs=1M count=500
$ losetup /dev/loop7 fs.iso
$ mkfs.btrfs /dev/loop7
$ mkdir mountpoint
$ mount /dev/loop7 mountpoint
$ cd mountpoint
$ echo "This is a write-only file" > target
$ chmod 200 target
$ ./exploit target output
$ cat output
This is a write-only file
Comment 4 Fedora Update System 2010-05-27 17:25:14 EDT
kernel-2.6.33.5-112.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/kernel-2.6.33.5-112.fc13
Comment 5 Fedora Update System 2010-05-28 02:59:28 EDT
kernel-2.6.32.14-127.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/kernel-2.6.32.14-127.fc12
Comment 6 Fedora Update System 2010-05-31 14:30:23 EDT
kernel-2.6.33.5-112.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2010-06-14 13:13:40 EDT
kernel-2.6.32.14-127.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

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