Skip to content
DoS Advisory Intermediate CVE-2019-5023

PaX read_kmem denial of service vulnerability

A memory leak in the PaX read_kmem function occurs when an invalid address is supplied, because an allocated buffer is not freed on an error path. An attacker who can repeatedly trigger reads from /dev/kmem with invalid addresses could exhaust memory and crash the system.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

An exploitable vulnerability exists in the grsecurity PaX patch for the function readkmem, in PaX from version pax-linux-4.9.8-test1 to 4.9.24-test7, grsecurity official from version grsecurity-3.1-4.9.8-201702060653 to grsecurity-3.1-4.9.24-201704252333, grsecurity unofficial from version v4.9.25-unofficialgrsec to…

Claudio Bozzato and Yves Younan, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the error path for an invalid kernel address returns without freeing the previously allocated temporary buffer.

Impact

An attacker who can repeatedly trigger invalid reads from /dev/kmem could exhaust system memory and cause a denial of service (crash).

What the attacker needed

/dev/kmem exposed (CONFIG_DEVKMEM); CAP_SYS_RAWIO capability; ability to trigger reads to /dev/kmem

How it was found

  1. Ensure /dev/kmem is available and accessible (requires CONFIG_DEVKMEM and CAP_SYS_RAWIO).
  2. Trigger a read from /dev/kmem using an invalid virtual address (e.g., address 0).
  3. Repeat the invalid read many times to leak memory.
  4. Observe system memory exhaustion and potential crash.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a bug in a security patch for the Linux kernel. The patch adds a temporary buffer to safely read kernel memory, but if the address being read is invalid, the function returns early without freeing that buffer. Each such failed read leaks a small amount of memory, and repeating it many times can use up all available memory and crash the system.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Claudio Bozzato

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.