[php-src] PR #21782: fix: four memcpy calls in main/streams/filter in filter.c

From: Date: Fri, 17 Apr 2026 01:34:05 +0000
Subject: [php-src] PR #21782: fix: four memcpy calls in main/streams/filter in filter.c
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-35751@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/21782 Author: orbisai0security ## Summary Fix critical severity security issue in main/streams/filter.c. ## Vulnerability | Field | Value | |-------|-------| | **ID** | V-001 | | **Severity** | CRITICAL | | **Scanner** | multi_agent_ai | | **Rule** | V-001 | | **File** | main/streams/filter.c:78 | | **CWE** | CWE-120 | **Description**: Four memcpy calls in main/streams/filter.c copy data into heap-allocated bucket buffers without verifying that the source length does not exceed the allocated destination buffer size. An attacker who can supply crafted stream input with a reported length exceeding the actual allocation triggers a heap buffer overflow, overwriting adjacent heap metadata. This is reachable via any PHP application that processes stream filters, including the built-in php://filter wrapper. ## Changes - main/streams/filter.c ## Verification - [x] Build passes - [x] Scanner re-scan confirms fix - [x] LLM code review passed --- *Automated security fix by [OrbisAI Security](https://orbisappsec.com)*

« previous php.git-pulls (#35751) next »