ModSecurity 3.0.14 configure script fails to detect lib64-installed YAJL, LMDB, and PCRE2
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- shell
- 領域
- build-system
調査の方向性
7096、7164、7870、7945、9086、9161行目のconfigureスクリプトのチェックから始め、lib/およびlib/x86_64-linux-gnu/の処理を既存のMaxMindチェックと比較してください。提供されている./configureコマンドを使用して問題を再現し、lib64にインストールされたYAJL、LMDB、PCRE2が検出され、コンパイルが成功することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The configure script in ModSecurity 3.0.14 fails to detect YAJL, LMDB, and PCRE2 libraries when they are installed in lib64 directories, causing compilation failures in container environments and various Linux distributions.
Logs and dumps
Configure script error output:
configure: error: YAJL was explicitly referenced but it was not found
configure: error: LMDB was explicitly referenced but it was not found
configure: error: PCRE2 was explicitly referenced but it was not found
To Reproduce
Steps to reproduce the behavior:
- Install YAJL, LMDB, or PCRE2 libraries in
/usr/local/[library]/lib64/directory - Run ModSecurity 3.0.14 configure script:
./configure --with-yajl=/usr/local/yajl-2.1.0 \ --with-lmdb=/usr/local/lmdb-0.9.33 \ --with-pcre2=/usr/local/pcre2-10.45 - Configure script fails to detect libraries despite correct installation paths
Expected behavior
The configure script should successfully detect YAJL, LMDB, and PCRE2 libraries when they are installed in standard lib64 directories, similar to how MaxMind and other libraries are detected.
Root Cause
The configure script's library detection logic only checks lib/ and lib/x86_64-linux-gnu/ directories but lacks support for the standard lib64/ directory where 64-bit libraries are commonly installed.
Affected Libraries
- YAJL (Yet Another JSON Library) - Detection fails at configure script lines 7096, 7164
- LMDB (Lightning Memory-Mapped Database) - Detection fails at lines 7870, 7945
- PCRE2 (Perl Compatible Regular Expressions 2) - Detection fails at lines 9086, 9161
Current Library Detection Pattern
The configure script currently checks:
# 1. Standard lib directory
if test -e "${path}/lib/lib${z}.${y}"; then
yajl_lib_path="${path}/lib/"
# ...
fi
# 2. Debian/Ubuntu specific path
if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then
yajl_lib_path="${path}/lib/x86_64-linux-gnu/"
# ...
fi
# Missing: lib64 directory check
Proposed Solution
Add lib64 directory detection between existing checks, following the same pattern already implemented for MaxMind and other libraries:
# Add this check between lib/ and lib/x86_64-linux-gnu/
if test -e "${path}/lib64/lib${z}.${y}"; then
yajl_lib_path="${path}/lib64/"
yajl_lib_name="${z}"
yajl_lib_file="${yajl_lib_path}/lib${z}.${y}"
break
fi
Server (please complete the following information):
- ModSecurity version (and connector): ModSecurity v3.0.14
- WebServer: N/A (compilation issue)
- OS (and distro): Multiple distributions affected:
- Alma Linux 9, 10
- CentOS Stream 9, 10
- Oracle Linux 9, 10
- Rocky Linux 9, 10
- Ubuntu 22.04, 24.04
- Debian 12, 13
Rule Set (please complete the following information):
- Running any public or commercial rule set? N/A (compilation stage issue)
- What is the version number? N/A
Additional context
Impact
- High: Prevents ModSecurity compilation in affected environments
- Widespread: Affects multiple Linux distributions and container builds
- Blocking: No workaround available without source code modification
Related Issues
- #3318 - Similar PCRE2 detection issue reported recently
Additional Information
- Libraries with existing lib64 support (no changes needed): MaxMind, CURL, GeoIP
- This issue is specific to ModSecurity 3.0.14; other versions not tested
- All existing functionality would be preserved with this fix
- Library Installation: Libraries correctly installed in
/usr/local/[library]/lib64/directories
Willingness to Contribute
I have developed and tested a complete patch for this issue across all affected distributions and am ready to submit a Pull Request if this approach is acceptable to the maintainers.
- 主要言語
- C++
- スター
- 9.8k
- フォーク
- 1.8k
- 平均マージ
- 2時間 46分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
owasp-modsecurity/ModSecurity のほかの issue
-
2.x Platform - IIS
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
owasp-modsecurity/ModSecurity#3623 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
2.x Platform - IIS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
owasp-modsecurity/ModSecurity#3621 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
2.x Platform - IIS
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
owasp-modsecurity/ModSecurity#3619 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
2.x Platform - IIS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
owasp-modsecurity/ModSecurity#3612 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
3.x
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
owasp-modsecurity/ModSecurity#3580 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
owasp-modsecurity/ModSecurity の issue をすべて見る
似ている issue
-
難易度 2/5 半日 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
ROCm/rocm-libraries#12703 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
isl-org/Open3D#7585 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
qbittorrent/qBittorrent#24975 ·
メンテナーはふだん 3 日以内に返信