Project

General

Profile

Actions

Bug #14136

closed

Heap-use-after-free in HTTP keep-alive connection handling

Added by Aleksei Davydov 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
11/24/2025
Due date:
% Done:

0%

Estimated time:

Description

Heap-use-after-free was found with ASAN on client disconnect during fuzz-testing with raw TCP packats (AFL++).

PR with fix proposal and details on GitHub: https://github.com/emweb/wt/pull/235

Trigger Scenario

  1. Client sends an HTTP request
  2. Server processes it and starts sending response
  3. Client closes connection
  4. handleWriteResponse() is called to clean up for next keep-alive request
  5. rcv_remaining_ points to a deleted buffer → heap-use-after-free in RequestParser::consume()

ASAN Report (first line)
==8==ERROR: AddressSanitizer: heap-use-after-free on address 0x625000000306
READ of size 1 at 0x625000000306 thread T4
#0 in http::server::RequestParser::consume() RequestParser.C:857

Please check Github PR for more info

Actions #1

Updated by Romain Mardulyn about 2 months ago

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn
  • Target version set to 4.12.4
Actions #2

Updated by Romain Mardulyn about 2 months ago

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)
Actions #3

Updated by Matthias Van Ceulebroeck about 1 month ago

  • Assignee set to Matthias Van Ceulebroeck
Actions #4

Updated by Romain Mardulyn about 1 month ago

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Matthias Van Ceulebroeck to Romain Mardulyn
  • Private changed from No to Yes
Actions #5

Updated by Romain Mardulyn about 1 month ago

  • Target version changed from 4.12.4 to 4.12.3
Actions #6

Updated by Romain Mardulyn about 1 month ago

  • Status changed from Implemented @Emweb to Closed
  • Private changed from Yes to No
Actions

Also available in: Atom PDF