Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

ModSecurity 3.0.14 configure script fails to detect lib64-installed YAJL, LMDB, and PCRE2

未关闭
#3,404 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 内容生成。

描述

3.x

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:

  1. Install YAJL, LMDB, or PCRE2 libraries in /usr/local/[library]/lib64/ directory
  2. 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
    
  3. 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 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

owasp-modsecurity/ModSecurity 的其他 Issue

查看 owasp-modsecurity/ModSecurity 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。