Skip to content

check cp bounds before reading A6 partial short in php_parserr#22201

Open
alhudz wants to merge 1 commit into
php:masterfrom
alhudz:dns-a6-partial-short-bounds
Open

check cp bounds before reading A6 partial short in php_parserr#22201
alhudz wants to merge 1 commit into
php:masterfrom
alhudz:dns-a6-partial-short-bounds

Conversation

@alhudz
Copy link
Copy Markdown

@alhudz alhudz commented Jun 1, 2026

Noticed the A6 branch in php_parserr reads cp[0] for the partial short without the CHECKCP guard every other field read in this function uses. With a 1-byte A6 rdata whose masklen % 16 is 9..15, cp already sits at end, so that byte is read past the response data and lands in the ipv6 string. Guard it like the surrounding reads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant