Linux Kernel CVE-2017-18017 の Poc を書いて検証した

表題の通り CVE-2017-18017 の PoC を書いてどのような影響があるのを検証・観察した

⚠️

一年以上前に修正パッチが出ている CVE です

CVE の Description

The tcpmss_mangle_packet function in net/netfilter/xt_TCPMSS.c in the Linux kernel before 4.11, and 4.9.x before 4.9.36, allows remote attackers to cause a denial of service (use-after-free and memory corruption) or possibly have unspecified other impact by leveraging the presence of xt_TCPMSS in an iptables action.

iptablesTCPMSS ターゲット ( --set-mss または --clamp-mss-to-pmtu ) を使っているホストに、細工した TCPヘッダを投げつけると use-after-free やメモリの破壊等々が起こせる

CVSS3 の Base Score が 9.8 と高い 🔥

続きを読む

【続 Vol.2 】ClamAV - clamd の OnAccessExtraScanning 機能のメモリリークをレポートした

2018年3月に ClamAV のバグレポートを出していた

hiboma.hatenadiary.jp

最近、進捗があったようで、以下のようなコメントをもらった

Due to time constraints in the development process for version 0.101,
OnAccessExtraScanning will be disabled in the upcoming 0.100.1 patch release
and the 0.101.0 feature release.  When we're able to dedicate the time to fix
the issue, we'll include it in the next patch or feature release.

注意: `0.101` と書いてあるのは `0.100.2` の間違い 

ref: https://bugzilla.clamav.net/show_bug.cgi?id=12048#c4

  • 0.102 で OnAccessExtraScanning は diabled になる ( 機能自体が取り払われるのかな? )
  • 0.101.2 で feature release として出る

ということだ。

リポジトリのコミットを見ると修正がなされているようだが、まだ時間がかかるらしい 🍵

github.com

Linux Kernel CVE-2018-12232 の Poc を書いて検証・観察した

表題の通り CVE-2018-12232 の PoC を書いてどのような影響があるのを検証・観察した

CVE の Description

CVE-2018-12232Linux Kernel に付いた CVE です

In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash.

net/socket.c in のレースコンディションで NULL ポインタ参照が起きてカーネルパニックします

続きを読む

鹿島神宮〜大洗〜筑波山 (DNF) 🚲

少し時間が経ってしまったが、 9/9(日) の記録

鹿島神宮駅から大洗に北上し海沿いをエンジョイしてから、残りは山だろうということで筑波山に向かった

145km ほど走って、みっちり走りきった

続きを読む

九十九里〜銚子〜鹿島神宮 🚲

9/8(土) 千葉駅から九十九里浜に出て、北上して銚子〜鹿島を走ってきた

走行距離 150km 位

輪行で日帰りプランのつもりで走っていたけど、疲れて帰路が面倒になったので、鹿島神宮駅で一泊し、次の日も走り続けた。

続きを読む

Linux Kernel CVE-2018-6554 の PoC を書いて検証・観察した

表題の通り CVE-2018-6554 が出ており、その PoC を書いてどのような影響があるのを検証・観察した

CVE の Description

CVE-2018-6554Linux Kernel に付いた CVE です

Memory leak in the irda_bind function in net/irda/af_irda.c and later in drivers/staging/irda/net/af_irda.c in the Linux kernel before 4.17 allows local users to cause a denial of service (memory consumption) by repeatedly binding an AF_IRDA socket.

CVE を調べたモチベーション

  • CVE の情報やパッチをみたら「あれ、これだったら自分でも再現できるんじゃない?」という内容だった
    • 隣の席に mrtc0 というセキュリティに滅法強い若者がいて、彼が日々あれこれ Poc PoC チーンしているのに触発された
    • https://blog.ssrf.in で有用なエントリをたくさん書いている。生活能力に懸念を感じる話も混じっている
  • (真面目な理由) 弊社 GMOペパボは、共有ホスティングやコンテナホスティングLinux ディストリビューション上でサービスしており、ローカルで任意のコードが実行されうるため Linux カーネル の CVE については詳細や影響度を把握しておきたい
続きを読む