Skip to content
Memory corruption Advisory Advanced CVE-2016-8339

Redis CONFIG SET client-output-buffer-limit command Code Execution Vulnerability

An out-of-bounds write occurs when the CONFIG SET client-output-buffer-limit command is given a client type of 'master', which is not a valid index for the client_obuf_limits array. An attacker with authenticated access could overwrite adjacent memory and potentially achieve code execution.

Cory Duplantis Follow

Originally disclosed on Cisco Talos

Medium 6.6 View original

An out of bounds write vulnerability exists in the handling of the client-output-buffer-limit option during the CONFIG SET command for the Redis data structure store. A crafted CONFIG SET command can lead to an out of bounds write potentially resulting in code execution.

Cory Duplantis, 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

The function getClientTypeByName returns -1 for unknown names and 3 for 'master', but the array client_obuf_limits has only 3 elements (indices 0-2), so using 'master' writes out of bounds.

Impact

An attacker with authenticated access could overwrite memory and potentially execute arbitrary code, though the CVSS score indicates high attack complexity.

What the attacker needed

Authenticated access to Redis

How it was found

  1. Connect to Redis and authenticate if required.
  2. Send a CONFIG SET client-output-buffer-limit command with the client type 'master' and three numeric values.

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.

Redis is a database that stores data in memory. A command meant to set limits for certain client types can be tricked into writing past the end of an array, corrupting nearby memory. This could let someone run their own code on the server.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Cory Duplantis

View all

35 more disclosed reports, 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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.