fix: Fix CVE-2023-40481, CVE-2023-31102, and CVE-2022-47069 security …#5
Open
Zeno-sole wants to merge 1 commit intodeepin-community:masterfrom
Open
fix: Fix CVE-2023-40481, CVE-2023-31102, and CVE-2022-47069 security …#5Zeno-sole wants to merge 1 commit intodeepin-community:masterfrom
Zeno-sole wants to merge 1 commit intodeepin-community:masterfrom
Conversation
…vulnerabilities This commit adds security patches for three CVEs affecting p7zip: - CVE-2023-40481: Fix out-of-bounds write in SquashFS file parsing The GetPath function in SquashfsHandler.cpp lacked proper bounds checking when parsing maliciously crafted SquashFS archives. Added validation to ensure the size field doesn't exceed available directory data bounds. - CVE-2023-31102: Fix integer underflow in Ppmd7.c The CreateSuccessors function could cause an integer underflow when numPs was decremented from zero, leading to invalid array access. Added a check to ensure numPs > 0 before decrementing. - CVE-2022-47069: Fix heap buffer overflow in FindCd function The FindCd function in ZipIn.cpp could access memory outside buffer bounds when parsing malformed ZIP archives. Added bounds checking for pointer arithmetic and offset validation. Changes: - debian/patches/17-fix-CVE-2023-31102.patch: New patch for Ppmd7 underflow - debian/patches/18-fix-CVE-2023-40481.patch: New patch for SquashFS bounds check - debian/patches/19-fix-CVE-2022-47069.patch: New patch for ZIP buffer overflow - debian/patches/series: Updated to include new patches - debian/changelog: Updated for version 16.02+dfsg-8deepin2 Log: Fixed CVE-2023-40481, CVE-2023-31102, and CVE-2022-47069 security vulnerabilities Influence: 1. Verify patches apply cleanly to p7zip source 2. Test 7Z archive decompression with PPMd compression 3. Test SquashFS archive handling 4. Test ZIP archive processing with various formats 5. Ensure no regressions in normal archive operations 修复 CVE-2023-40481、CVE-2023-31102 和 CVE-2022-47069 安全漏洞 本次提交为 p7zip 的三个 CVE 添加了安全补丁: - CVE-2023-40481:修复 SquashFS 文件解析中的越界写入 SquashfsHandler.cpp 中的 GetPath 函数在解析恶意构造的 SquashFS 存档时 缺少适当的边界检查。添加了验证以确保大小字段不超过可用目录数据边界。 - CVE-2023-31102:修复 Ppmd7.c 中的整数下溢 CreateSuccessors 函数在 numPs 从零递减时可能导致整数下溢,导致无效的 数组访问。添加了在递减之前确保 numPs > 0 的检查。 - CVE-2022-47069:修复 FindCd 函数中的堆缓冲区溢出 ZipIn.cpp 中的 FindCd 函数在解析格式错误的 ZIP 存档时可能访问缓冲区 边界之外的内存。添加了指针算术的边界检查和偏移量验证。 Log: 修复 CVE-2023-40481、CVE-2023-31102 和 CVE-2022-47069 安全漏洞 Influence: 1. 验证补丁可以干净地应用到 p7zip 源代码 2. 测试使用 PPMd 压缩的 7Z 存档解压缩 3. 测试 SquashFS 存档处理 4. 测试各种格式的 ZIP 存档处理 5. 确保正常存档操作没有回归 repo: p7zip #master
|
TAG Bot TAG: 16.02+dfsg-8deepin2 |
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Author
|
/integrate |
|
AutoIntegrationPr Bot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…vulnerabilities
This commit adds security patches for three CVEs affecting p7zip:
CVE-2023-40481: Fix out-of-bounds write in SquashFS file parsing The GetPath function in SquashfsHandler.cpp lacked proper bounds checking when parsing maliciously crafted SquashFS archives. Added validation to ensure the size field doesn't exceed available directory data bounds.
CVE-2023-31102: Fix integer underflow in Ppmd7.c The CreateSuccessors function could cause an integer underflow when numPs was decremented from zero, leading to invalid array access. Added a check to ensure numPs > 0 before decrementing.
CVE-2022-47069: Fix heap buffer overflow in FindCd function The FindCd function in ZipIn.cpp could access memory outside buffer bounds when parsing malformed ZIP archives. Added bounds checking for pointer arithmetic and offset validation.
Changes:
Log: Fixed CVE-2023-40481, CVE-2023-31102, and CVE-2022-47069 security vulnerabilities
Influence:
修复 CVE-2023-40481、CVE-2023-31102 和 CVE-2022-47069 安全漏洞
本次提交为 p7zip 的三个 CVE 添加了安全补丁:
CVE-2023-40481:修复 SquashFS 文件解析中的越界写入 SquashfsHandler.cpp 中的 GetPath 函数在解析恶意构造的 SquashFS 存档时 缺少适当的边界检查。添加了验证以确保大小字段不超过可用目录数据边界。
CVE-2023-31102:修复 Ppmd7.c 中的整数下溢 CreateSuccessors 函数在 numPs 从零递减时可能导致整数下溢,导致无效的 数组访问。添加了在递减之前确保 numPs > 0 的检查。
CVE-2022-47069:修复 FindCd 函数中的堆缓冲区溢出 ZipIn.cpp 中的 FindCd 函数在解析格式错误的 ZIP 存档时可能访问缓冲区 边界之外的内存。添加了指针算术的边界检查和偏移量验证。
Log: 修复 CVE-2023-40481、CVE-2023-31102 和 CVE-2022-47069 安全漏洞
Influence:
repo: p7zip #master