# 前言

图片

# 受影响版本以及系统

xz 和 liblzma 5.6.0~5.6.1 版本

可能包括的发行版 / 包管理系统有:

  • Fedora 41 / Fedora Rawhide
  • Debian Sid
  • Alpine Edge
  • x64 架构的 homebrew
  • 滚动更新的发行版,包括 Arch Linux / OpenSUSE Tumbleweed

通过以下命令检查版本

1
xz --version

# 检查脚本

author: Vegard Nossum; source: https://www.openwall.com/lists/oss-security/2024/03/29/4/3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash

set -eu

# find path to liblzma used by sshd
path="$(ldd $(which sshd) | grep liblzma | grep -o '/[^ ]*')"

# does it even exist?
if [ "$path" == "" ]
then
echo probably not vulnerable
exit
fi

# check for function signature
if hexdump -ve '1/1 "%.2x"' "$path" | grep -q f30f1efa554889f54c89ce5389fb81e7000000804883ec28488954241848894c2410
then
echo probably vulnerable
else
echo probably not vulnerable
fi

# Docker 容器批量检查

请在 root 用户下执行

1
docker ps -aq | xargs -I {} docker exec {} sh -c 'xz --version || echo "xz not found"' 2>/dev/null

# 其他链接

https://nvd.nist.gov/vuln/detail/CVE-2024-3094
https://github.com/advisories/GHSA-rxwq-x6h5-x525
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-3094
https://openssf.org/blog/2024/03/30/xz-backdoor-cve-2024-3094/
https://www.landiannews.com/archives/103141.html
https://www.redhat.com/en/blog/urgent-security-alert-fedora-41-and-rawhide-users

# 参考

[安全警告] xz 和 liblzma 5.6.0~5.6.1 版本上游被植入后门,影响所有 x64 架构 Linux 和 macOS
liblzma /xz 被植入后门,Jia Tan 是何方神圣
xz/liblzma v5.6.0/5.6.1 被植入了以 sshd 为目标的后门