zlib: reject truncated zstd input by Archkon · Pull Request #64593 · nodejs/node · GitHub
Skip to content

zlib: reject truncated zstd input - #64593

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Archkon:zlib
Jul 21, 2026
Merged

zlib: reject truncated zstd input#64593
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Archkon:zlib

Conversation

@Archkon

@Archkon Archkon commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Fixes: #64592

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. zlib Issues and PRs related to the zlib module and its compression dependencies. labels Jul 19, 2026
Treat an unfinished Zstd frame as an unexpected end of file when the
stream is finalized with ZSTD_e_end.

Avoid reporting an error while the output buffer still needs to be
drained or when an empty final write follows a completed frame. Preserve
partial decompression when ZSTD_e_flush is used.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

@islandryu islandryu added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 19, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 19, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Jul 21, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jul 21, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 8c1d128 into nodejs:main Jul 21, 2026
74 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Archkon
Archkon deleted the zlib branch July 21, 2026 14:33
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
Treat an unfinished Zstd frame as an unexpected end of file when the
stream is finalized with ZSTD_e_end.

Avoid reporting an error while the output buffer still needs to be
drained or when an empty final write follows a completed frame. Preserve
partial decompression when ZSTD_e_flush is used.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64593
Fixes: #64592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
Treat an unfinished Zstd frame as an unexpected end of file when the
stream is finalized with ZSTD_e_end.

Avoid reporting an error while the output buffer still needs to be
drained or when an empty final write follows a completed frame. Preserve
partial decompression when ZSTD_e_flush is used.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64593
Fixes: #64592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
Treat an unfinished Zstd frame as an unexpected end of file when the
stream is finalized with ZSTD_e_end.

Avoid reporting an error while the output buffer still needs to be
drained or when an empty final write follows a completed frame. Preserve
partial decompression when ZSTD_e_flush is used.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64593
Fixes: #64592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Jul 29, 2026
Treat an unfinished Zstd frame as an unexpected end of file when the
stream is finalized with ZSTD_e_end.

Avoid reporting an error while the output buffer still needs to be
drained or when an empty final write follows a completed frame. Preserve
partial decompression when ZSTD_e_flush is used.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64593
Fixes: #64592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 6, 2026
Treat an unfinished Zstd frame as an unexpected end of file when the
stream is finalized with ZSTD_e_end.

Avoid reporting an error while the output buffer still needs to be
drained or when an empty final write follows a completed frame. Preserve
partial decompression when ZSTD_e_flush is used.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64593
Fixes: #64592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. zlib Issues and PRs related to the zlib module and its compression dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zlib: Zstd decompression silently accepts truncated input

5 participants