Double free after allocation failure in regcomp and regexec
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| The GNU C Libraryglibc |
2.3 〜 2.44→ 記載なし |
記載なし |
この記録には修正版の版が載っていません。修正版の有無と版は、本文か参照URLのベンダーの勧告で確かめてください。
ディストリビューション別の修正状況
各ディストリビューションが公開している、この CVE の記録です。修正版は配布版ごとに違うので、リンク先で確かめてください。
- BellSoft Alpaquita BELL-CVE-2026-100290 glibc 修正版あり
- Debian DEBIAN-CVE-2026-100290 glibc この記録に修正版の記載なし
- Ubuntu UBUNTU-CVE-2026-100290 glibc, eglibc この記録に修正版の記載なし
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
The regcomp and regexec functions in the GNU C Library version 2.3 to version 2.44 may read freed memory and free the same heap block twice when a memory allocation fails while a regular expression is compiled or matched. The re_dfa_add_node (the NFA node table) and build_range_exp (bracket ranges) grow several arrays with consecutive realloc calls and store the new pointers only after all of them succeed. When a later call fails, the pattern buffer keeps pointers to blocks that were already freed, and the error cleanup frees them again. In regexec, the back-reference cache (match_ctx_add_entry) frees its array when a realloc fails but keeps the pointer, which is freed again on the error path.
An attacker does not need to supply a crafted regular expression: patterns large enough to grow these arrays are common. The failure has to hit a specific allocation, though, so the issue can only be reached when the system is already under memory pressure. An attacker who supplies the pattern or the subject string has little control over which allocation fails, so the expected impact is a crash of the process. This issue affects all architectures and ABIs supported by the GNU C Library.
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory sourceware.org
- advisory nvd.nist.gov
- advisory github.com
- REDHAT Red Hat
- report sourceware.org
- report sourceware.org
- web github.com