OpenSSL config path does not respect open_basedir restriction
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
Currently the config in options passed to some functions is not checked if it is inside open_basedir restriction. This should be probably fixed just in master as it is not usually a big issue considering that the config is basically read only and some user flows might have relied on it being in the system path so we don't want to break them in a patch release. However we should still confirm to the open_basedir rules and prohibit it in master branch. One thing to note that this should not be applied on the default path as it would be too big break for not a big gain.
The following code:
<?php
// cert path (existing cert)
$config= "$file_path/openssl.cnf";
ini_set('open_basedir', "$file_path/config");
$pkey= openssl_pkey_new([
'config' => $config
]);
var_dump($pkey);
Resulted in this output:
object...
But I expected this output instead:
possibly warning
bool(false)
PHP Version
Any
Operating System
Any
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
openssl_pkey_new() のエントリーポイントから開始し、明示的な 'config' オプションが open_basedir 下でどのように処理されるかを追跡します。制限外の設定パスが拒否される一方で、デフォルトパスには影響がないことを確認し、その後、両方のケースに対するリグレッションテストを追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- security
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100