CVE-2013-2596 — Linux Kernel Integer Overflow Vulnerability

CVE-2013-2596

Linux Kernel — fb_mmap Framebuffer Integer Overflow Maps Physical Memory to Userspace for Android and Linux Privilege Escalation

What is the Linux Kernel?

The Linux kernel is the core of Linux-based operating systems, including Android. The framebuffer subsystem (drivers/video/fbmem.c) provides a unified interface to graphics hardware through a virtual device (/dev/fb0). Applications can map the framebuffer into their address space using mmap(), which calls the kernel's fb_mmap function. Any local user or application with access to the framebuffer device can invoke this mapping operation.

Overview

CVE-2013-2596 is an integer overflow vulnerability (CWE-190) in the Linux kernel's framebuffer memory mapping function fb_mmap in drivers/video/fbmem.c. When a local user calls mmap() on the framebuffer device with a crafted offset and length combination that causes integer overflow in the size calculation, the resulting mapping extends beyond the intended framebuffer region and into arbitrary physical memory. This provides read/write access to kernel memory, enabling full privilege escalation.

The fix was committed to the Linux kernel (commit fc9bbca8f650) before the CVE was published in April 2013.

Affected Versions

Component Vulnerable Versions Fixed Version
Linux kernel Prior to 3.9-rc1 (approximately) 3.9 and later; backports to stable branches
Android Kernels based on vulnerable Linux versions Device-specific vendor patches

Technical Details

The vulnerability is in fb_mmap() in drivers/video/fbmem.c. When computing the physical memory range to map into userspace, the function uses the start offset and len (length) parameters from the mmap() syscall. The integer overflow occurs when:

  1. A large start offset is combined with a non-trivial length
  2. The addition start + len overflows the address-width integer
  3. The resulting wrapped value passes size and bounds checks that would reject the un-overflowed values
  4. The kernel maps a physical memory region that extends well beyond the framebuffer into arbitrary physical address space

The mapped region can include kernel code, kernel data structures, and hardware memory-mapped I/O registers. A process that writes to the correct offsets within this mapping can overwrite kernel function pointers, security credentials, or other privileged data structures — achieving ring-0 code execution or direct privilege escalation (e.g., overwriting the process's cred structure to grant root).

Android impact: This vulnerability was particularly significant on Android, where many devices ran kernel versions that had not received this fix. Android apps with any permissions that granted framebuffer device access (or via companion vulnerabilities) could leverage this for privilege escalation to root.

Discovery

The fix was contributed to the Linux kernel in April 2013. The security implications became apparent from code review, leading to CVE assignment.

Exploitation Context

CISA confirmed exploitation in the wild. The vulnerability was incorporated into Android rooting tools and malware privilege escalation chains. Linux framebuffer integer overflow vulnerabilities are attractive on Android because:

  • Many Android devices run long-outdated kernel versions that never received stable-branch backports
  • Root exploits on Android enable persistent malware installation, bypassing app-level sandboxing
  • The attack requires only a local process (installed app) — no internet access needed after app installation

Remediation

  1. Apply kernel updates — the fix is in kernel 3.9+ and was backported to stable branches; apply vendor-provided kernel updates
  2. For Android: apply OEM/carrier security updates that include kernel patches
  3. Restrict access to framebuffer devices (/dev/fb*) to privileged users only — audit /dev/fb* permissions
  4. For Android enterprise deployments: use MDM policies that prevent installation of untrusted applications which could deliver this exploit
  5. Devices that no longer receive security updates should be considered end-of-life from a security perspective

Key Details

PropertyValue
CVE ID CVE-2013-2596
Vendor / Product Linux — Kernel
NVD Published2013-04-13
NVD Last Modified2025-10-22
CVSS 3.1 Score7.8
CVSS 3.1 VectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-190 find similar ↗
CISA KEV Added2022-09-15
CISA KEV Deadline2022-10-06
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2022-10-06. Apply updates per vendor instructions.

Timeline

DateEvent
2013-04-09Linux kernel fix committed (fc9bbca8f650e5f738af8806317c0a041a48ae4a)
2013-04-13CVE-2013-2596 published
2013Exploit incorporated into Android privilege escalation toolkits
2022-09-15Added to CISA Known Exploited Vulnerabilities catalog
2022-10-06CISA BOD 22-01 remediation deadline