Skip to content

v0.2.7

Choose a tag to compare

@arman-bd arman-bd released this 18 Nov 00:16
· 1 commit to main since this release
4bf6a49

Release Notes - httpmorph 0.2.7

Release Date: 2025-11-17
Type: Security & Stability Release

Overview

This release focuses on security hardening and proxy reliability improvements. We've fixed 9 critical bugs including memory safety issues and async SSL handling, plus added intelligent retry logic for network-dependent tests.


🔒 Security Fixes (9 Total)

Critical Vulnerabilities Fixed

1. HTTP/2 NULL Pointer Dereference (CRITICAL)

  • File: src/core/http2_logic.c:103-146
  • Issue: Missing NULL check after stream_data fallback in on_frame_recv_callback
  • Impact: Potential crash when handling HTTP/2 frames
  • Fix: Added safety checks after fallback operations

2. HTTP/2 Stream Data NULL Pointer (CRITICAL)

  • File: src/core/http2_logic.c:103-146
  • Issue: Missing NULL check in on_data_chunk_recv_callback
  • Impact: Crash on malformed HTTP/2 streams
  • Fix: Return NGHTTP2_ERR_CALLBACK_FAILURE when stream_data is NULL

3. Cookie Buffer Overflow (CRITICAL)

  • File: src/core/cookies.c:115-153
  • Issue: Unsafe strcat() usage without bounds checking
  • Impact: Buffer overflow with many/large cookies
  • Fix: Replaced with bounds-checked snprintf() and size tracking

High Severity Vulnerabilities Fixed

4. TLS Cipher Buffer Overflow (HIGH)

  • File: src/core/tls.c:126-160
  • Issue: No bounds checking before cipher string concatenation
  • Impact: Buffer overflow with many cipher suites
  • Fix: Added space calculation and overflow detection

5. Connection Pool Use-After-Free (HIGH)

  • File: src/core/core.c:163-190
  • Issue: Accessing TLS info after connection destruction
  • Impact: Use-after-free leading to crashes or memory corruption
  • Fix: Copy TLS info before destroying connection

6. Request Builder Integer Overflow (HIGH)

  • File: src/core/request_builder.c:24-49
  • Issue: Capacity calculation without overflow detection
  • Impact: Memory corruption on very large requests
  • Fix: Added overflow checks before arithmetic operations

Medium Severity Vulnerabilities Fixed

7. DNS Cache Memory Leak (MEDIUM)

  • File: src/core/network.c:217-248
  • Issue: Missing cleanup on failed allocations
  • Impact: Memory leak in error paths
  • Fix: Added proper error handling and resource cleanup

8. Connection Pool TLS Info Leak (MEDIUM)

  • File: src/core/core.c:478-501
  • Issue: Memory leak in connection pool TLS info storage
  • Impact: Slow memory leak over time
  • Fix: Proper cleanup of TLS info on connection destruction

Async Proxy Bug Fixed

9. Async SSL EOF Handling (BUG)

  • File: src/core/async_request.c:1342-1400
  • Issue: SSL_ERROR_SYSCALL with errno=0 treated as error instead of clean EOF
  • Impact: Async proxy requests failing with "SSL read failed: system error 0"
  • Fix: Special case handling for clean connection close (EOF)