Skip to content

Commit 335eb93

Browse files
committed
Translate CVE-2026-46727 news (zh_tw)
1 parent 604a823 commit 335eb93

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: news_post
3+
title: "CVE-2026-46727: 基於 pthread 的 getaddrinfo 逾時處理常式中的 Use-after-free 漏洞"
4+
author: "hsbt"
5+
translator: "Bear Su"
6+
date: 2026-05-20 00:00:00 +0000
7+
tags: security
8+
lang: zh_tw
9+
---
10+
11+
在 Ruby 基於 pthread 的 `getaddrinfo` 逾時處理常式中,發現了一個 use-after-free 漏洞。
12+
該漏洞的 CVE 編號為 [CVE-2026-46727](https://www.cve.org/CVERecord?id=CVE-2026-46727)
13+
此漏洞已在 Ruby 4.0.5 修復。我們建議您升級 Ruby 版本。
14+
15+
## 風險細節
16+
17+
`Addrinfo.getaddrinfo(..., timeout:)``Socket.tcp(..., resolv_timeout:)` 使用的 `rb_getaddrinfo`,在逾時取消路徑中存在一個競爭條件。
18+
能夠將 DNS 回應延遲至接近指定逾時時間的遠端攻擊者,可能導致 Ruby 行程 dereference 已釋放的記憶體並崩潰。
19+
20+
## 建議行動
21+
22+
請更新至 Ruby 4.0.5 或更新版本。
23+
24+
## 暫時解決方法
25+
26+
如果您不能立即升級,請避免傳遞 `timeout:``Addrinfo.getaddrinfo``resolv_timeout:``Socket.tcp`
27+
28+
## 受影響版本
29+
30+
* Ruby 4.0.0 至 4.0.4
31+
* 在修復之前的 Ruby 4.1.0-dev (master)
32+
33+
Ruby 3.4 系列與之前的版本不受影響。
34+
35+
## 致謝
36+
37+
感謝 [cantina-security](https://hackerone.com/cantina-security) 發現此問題。
38+
感謝 [shioimm](https://github.com/shioimm) 協助修復此風險漏洞。
39+
40+
## 歷史
41+
42+
* 最初發布於 2026-05-20 00:00:00 (UTC)

0 commit comments

Comments
 (0)