POJIA破甲
地图 / Memory Leak in bytes_to_hexstring Function

Memory Leak in bytes_to_hexstring Function

内存破坏 / 释放后使用 / #2779070

厂商
Linux Foundation Decentralized Trust
严重程度
低危
赏金
—
弱点
释放后使用
研究员
@cutiapretaa
披露日期
2024-10-24
资产
https://github.com/hyperledger/fabric-private-chaincode
CVE
—

该报告还没有中文解读。

原文摘录

摘自原文(5293 字符中的一小部分)
Overview The function` bytes_to_hexstring` located in the `utils.c` file has a confirmed memory leak vulnerability. This function is responsible for converting an array of bytes into a hexadecimal string representation. However, it allocates memory dynamically using `malloc` without any error …
原文中的代码
char* bytes_to_hexstring(uint8_t* bytes, size_t len)
{
    const char* hexdigs = "0123456789abcdef";
    size_t k = len * 2 + 1;
    char* out = malloc(k);
    for (int i = 0; i < len; i++)
    {
        out[i * 2] = hexdigs[bytes[i] >> 4];
        out[i * 2 + 1] = hexdigs[bytes[i] & 0x0f];
    } …

默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 Linux Foundation Decentralized Trust 所有。

时间线

  • 报告提交
  • 公开披露
阅读 HackerOne 原文 ↗作者 @cutiapretaa · 版权归作者与 Linux Foundation Decentralized Trust 所有

同类报告

Use-After-Free In IPV6_2292PKTOPTIONS leading To Arbitrary Kernel R/W PrimitivesPlayStation · 2020-07-06 · $10,000sys_fsc2h_ctrl kernel stack freePlayStation · 2025-04-18 · $10,000Use-after-free in setsockopt IPV6_2292PKTOPTIONS (CVE-2020-7457)PlayStation · 2022-09-20 · $10,000CVE-2021-22901: TLS session caching disastercurl · 2021-05-26Old WebKit HTML agent in Template Preview function has multiple known vulnerabilities leading to RCELob · — · $1,500Use-After-Free in SMB connection reuse (req->path dangling pointer after needle destruction)curl · 2026-04-29