Add a way to reserve shmop memory ids and prevent shmop_open (e.g. opcache's region)
オープン
まだ誰も着手していません。
Extension: opcache
Extension: shmop
Extension: sysvshm
Feature
Status: Needs Triage
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.1k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
Related to https://github.com/php/php-src/issues/9944
Prevent accidentally or intentionally reading or writing to shared memory regions which would be used by opcache, or other extensions such as APCu
A possible approach:
- Add a helper method in
Zend/directory to track ids used during module initialization - Make the ext/shmop extension check if those ids were already used and treat it like a native error code for https://php.net/shmop_open
- Add an ini setting to disable this protection, in case userland debuggers/visualizers have valid use cases for this
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まずリンク先の ext/opcache/shared_alloc_shm.c を読み、次に ext/shmop の実装と Zend/ ディレクトリを調べます。モジュールの初期化で予約済みの ID を追跡する方法と、shmop_open がネイティブエラーを報告する方法を確認します。opcache および他の拡張機能の領域に誤ってアクセスできないこと、そして提案されている opt-out の ini 設定が考慮されていることが完了条件です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- operating-systems, security
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100