xzのバックドア対応しようとした、なんか2つ入ってた話

広告は適当。

話の発端はこんな記事から。

広く使用されている「xz」にssh接続を突破するバックドアが仕込まれていた事が判明。重大度はクリティカルでLinuxのほかmacOSにも影響
https://softantenna.com/blog/xz-backdoor/

こりゃxzのバージョンをダウングレードしないと、と思ってコマンドを打ってみたら、

% brew update
==> Updating Homebrew...
Already up-to-date.
% brew upgrade xz
Warning: xz 5.6.1 already installed
% brew list --version xz
xz 5.4.6 5.6.1
% brew info xz
==> xz: stable 5.4.6 (bottled)
General-purpose data compression with high compression ratio
https://xz.tukaani.org/xz-utils/
/homebrew/Cellar/xz/5.4.6 (163 files, 2.6MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-04-01 at 09:54:21
/homebrew/Cellar/xz/5.6.1 (166 files, 2.7MB)
  Poured from bottle using the formulae.brew.sh API on 2024-03-27 at 11:18:00

なんか2つ入ってる。

よくわからないので、アンインストールして再度入れ直すことに。

brew uninstall xz
依存関係あるからダメって怒られる。

brew uninstall --ignore-dependencies xz
なんかまだ入ってるって言われる。

ということで、これで完全削除
brew uninstall --force xz

からの、再度インストールで
brew install xz
https://ghcr.io/v2/homebrew/core/xz/manifests/5.4.6

大丈夫な5.4.6にダウングレードできました。