UCloud-202310-002:curl SOCKS5堆溢出漏洞安全警告

漏洞详情

官方发布新版本修复curl SOCKS5 堆溢出漏洞(CVE-2023-38545):当使用socks5代理时,如果主机名大于255则curl会尝试使用本地解析代替远程解析,但没有按照预期工作,导致内存损坏,攻击者可以构造恶意主机名触发漏洞,成功利用该漏洞将造成代码执行。

影响范围

系统

软件

受影响范围

所有

libcurl(自编译)

7.69.0 <= libcurl <= 8.3.0

Red Hat Enterprise Linux 6

curl

不受影响

Red Hat Enterprise Linux 7

curl

不受影响

Red Hat Enterprise Linux 8

curl

不受影响

Red Hat Enterprise Linux 9

curl

受影响,暂未公布

Ubuntu lunar

curl、libcurl

<7.88.1-8ubuntu2.3

Ubuntu jammy

curl、libcurl

<7.81.0-1ubuntu1.14

Ubuntu focal

curl、libcurl

7.68.0-1ubuntu2.19

Ubuntu bionic

curl、libcurl

不受影响

Ubuntu xenial

curl、libcurl

不受影响

Ubuntu trusty

curl、libcurl

不受影响

debian buster

curl

不受影响

debian bullseye

curl

< 7.74.0-1.3+deb11u10

debian bookworm

curl

< 7.88.1-10+deb12u4

debian (unstable)

curl

< 8.3.0-3

修复方案

注意:安装升级前,请做好数据备份、快照和测试工作,防止发生意外

系统

软件

修复版本

所有

libcurl(自编译)

8.4.0

Red Hat Enterprise Linux 9

curl

暂未公布

Ubuntu lunar

curl、libcurl

7.88.1-8ubuntu2.3

Ubuntu jammy

curl、libcurl

7.81.0-1ubuntu1.14

Ubuntu focal

curl、libcurl

7.68.0-1ubuntu2.19

debian bullseye

curl

7.74.0-1.3+deb11u10

debian bookworm

curl

7.88.1-10+deb12u4

debian (unstable)

curl

8.3.0-3

缓解措施:

1)不要与 CURLPROXY_SOCKS5_HOSTNAME 代理一起使用;

2)不要将代理环境变量设置为socks5h://

参考链接

https://github.com/curl/curl/discussions/12026

https://curl.se/docs/security.html