Skip to content
Memory corruption Write-up Advanced

Hunting bugs in Accel-PPP with CodeQL

The article describes three memory corruption vulnerabilities in Accel-PPP, an open-source VPN server, found using CodeQL. In each case, a length value derived from network input was used in a memcpy without proper bounds checking, leading to out-of-bounds writes that could crash the server.

medium.com

Published on medium.com

Chloe Ong

Chloe Ong, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could crash the VPN server by sending a crafted packet, causing a denial of service; the article does not demonstrate remote code execution.

What the attacker needed

Network access to the VPN server

How it was found

  1. Run a CodeQL query to find data flows from user input to memcpy.
  2. Analyse the results to identify a memcpy where the length argument is user-controlled and not validated.
  3. Write a script to send a large packet to the server.
  4. Execute the script, causing a crash due to memory corruption.

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 write-up has not been written yet. The Original tab links to the source.

The researcher used a tool called CodeQL to automatically scan the source code of a VPN server for patterns where data from the network is copied into a fixed-size memory buffer without checking its length. This can cause the program to write past the end of the buffer, corrupting memory and potentially crashing the server. The article explains how the bugs were found and includes proof-of-concept scripts that trigger crashes.

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.

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.