Copy-on-write

Updated: 12/31/2022 by Computer Hope

Copy-on-write or CoW is a technique to efficiently copy data resources in a computer system. If a unit of data is copied but not modified, the "copy" can exist as a reference to the original data. Only when the copied data is modified is a copy created, and new bytes are actually written.

Copy-on-write is closely related to data deduplication. Whereas data deduplication analyzes chunks or blocks of data, copy-on-write applies to entire files or allocated units of memory.

Dirty CoW

In October 2016, a vulnerability in the Linux kernel was discovered that exploited a race condition in its copy-on-write mechanism. Nicknamed "Dirty CoW," this timing attack (CVE-2016-5195) would permit a local user to modify the read-only portion of CoW data. It was found to affect nearly every system using the Linux kernel, including devices running Android 7 or older, and was quickly patched.

Android, Linux kernel, Operating System terms