POJIA破甲
地图 / Off-by-One Buffer Overflow in SMB Path Handler

Off-by-One Buffer Overflow in SMB Path Handler

内存破坏 / Off-by-one Error / #3427343

厂商
curl
严重程度
低危
赏金
—
弱点
Off-by-one Error
研究员
@pelioro
披露日期
2025-11-15
资产
https://github.com/curl/curl
CVE
—

该报告还没有中文解读。

原文摘录

摘自原文(2101 字符中的一小部分)
Found an off-by-one buffer overflow in `lib/smb.c` when handling SMB file paths. The bounds check uses `>` instead of `>=`, allowing a path of exactly 1023 bytes to overflow the 1024-byte buffer by one byte when the null terminator is added.
原文中的代码
struct smb_nt_create {
    // ... other fields ...
    char bytes[1024];  // fixed size buffer
} PACK;

static CURLcode smb_send_open(...) {
    struct smb_nt_create msg;
    const size_t byte_count = strlen(req->path) + 1;
    
    if(byte_count > sizeof(msg.bytes))  // Wrong: should be >= …

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

时间线

  • 报告提交
  • 公开披露
阅读 HackerOne 原文 ↗作者 @pelioro · 版权归作者与 curl 所有

同类报告

urlapi: off-by-one in custom scheme validation skips last charactercurl · 2026-03-121-byte heap buffer overflow in DNS resolverInternet Bug Bounty · 2021-08-27Mishandling of hackerone clear background checks resulting in disclosure of other hacker's informationHackerOne · 2021-08-05Subdomain Takeover due to unclaimed domain pointing to AWSGSA Bounty · 2019-08-26Exim off-by-one RCE vulnerabilityInternet Bug Bounty · 2019-09-26