https://gist.github.com/tesaguri/f3c73f81bc000f669fc8adfab316603b
I'm publishing a hotfix for Misskey v2024.3.1 (78ff90f) aimed at fixing the security issue disclosed by its forks Iceshrimp and Meisskey on 2024-04-29Z. See the README.md file of the Gist for details of the patch.
I deeply regret to disclose the patch by myself before the upstream releases a fix, but I'm doing this because the upstream appears so busy that they have not responded to my report for more than 7 days after the submission.
I'm disclosing the patch in the hope that it will help to protect the users of Misskey rather than to risk them, in light of the recent disclosure of the issue by the fork (but make sure to review the disclaimer in the UNLICENSE file).
2024年4月29日から30日にかけてIceshrimpおよびめいすきーで修正されたMisskeyのセキュリティ上の問題を本家においても修正することを目的としたパッチを公開します。公開の経緯およびパッチの詳細については引用元の投稿とそのリンク先のREADMEを参照してください。
QT: https://fedibird.com/@tesaguri/112355977374946818 [参照]
https://gist.github.com/tesaguri/f3c73f81bc000f669fc8adfab316603b
I'm publishing a hotfix for Misskey v2024.3.1 (78ff90f) aimed at fixing the security issue disclosed by its forks Iceshrimp and Meisskey on 2024-04-29Z. See the README.md file of the Gist for details of the patch.
https://gist.github.com/tesaguri/f3c73f81bc000f669fc8adfab316603b
I'm publishing a hotfix for Misskey v2024.3.1 (78ff90f) aimed at fixing the security issue disclosed by its forks Iceshrimp and Meisskey on 2024-04-29Z. See the README.md file of the Gist for details of the patch.
一応w3id.org/security/v1でも代替可能なはずなのに何故か今も使い回されているコンテクストIRI
@mei23 当時の規格(<https://github.com/w3c-ccg/ld-signatures/blob/d0af56856684924156a94838f9482a27766bb2be/index.html>)としては特に検証者側signature optionsのコンテクストを差し替えるような指示はなかったと思うので、差し替えるとしてもSecurity Vocabularyのコンテクストでも良さそうな気がしますね(そもそも厳密には署名者側から提供されたコンテクストでexpandしてから検証者側が理解するコンテクストでcompactするのが正しい気もしますが)
https://gist.github.com/tesaguri/f3c73f81bc000f669fc8adfab316603b#file-hotfix-ghsa-2vxv-pv3m-3wvj-patch-L9
署名以外の処理もするようになったしもはや`LdSignatureService`という命名は相応しくないやろ〜と改名してしまったけど、冷静に考えると脆弱性の修正にそんなしょうもないリファクタリングを抱き合わせるなという話なのだよな……
QAもどき(変更箇所にテストがないので手動でサーバを動かして破綻していないか確認する。なお情報公開前なので公開でpushして適当にCIでコンテナイメージをビルドさせるわけにもいかない)
https://github.com/MisskeyIO/misskey/commit/6b1b7fdda5b3c3506d37de702879d7a9af5b0dd6
まあつまり、こっちの方が正しいのだよなあ
怖い話をしても良いですか? いいよー。私、今までTypeScriptは1ミリ行も書いたことがないのですよね……(?)