低危 在正则表达式搜索期间,在mbc_enc_len()中读取越界堆栈

CVE编号

CVE-2017-9227

利用情况

暂无

补丁情况

官方补丁

披露时间

2017-05-25
漏洞描述
在Oniguruma 6.2.0中发现了一个问题,在Ruby中通过2.4.1使用Oniguruma-mod,在PHP中通过7.1.5使用mbstring。在正则表达式搜索期间,在mbc_enc_len()中发生堆栈越界读取。在forward_search_range()中对reg-> dmin的无效处理可能导致无效的指针解除引用,作为从堆栈缓冲区读取的越界。

解决建议
目前厂商已经发布了升级补丁以修复此安全问题,补丁获取链接:
https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 oniguruma_project oniguruma 6.2.0 -
运行在以下环境
应用 php php * Up to
(including)
7.1.5
运行在以下环境
应用 ruby-lang ruby * Up to
(including)
2.4.1
运行在以下环境
系统 alpine_3.4 php5 * Up to
(excluding)
5.6.31-r0
运行在以下环境
系统 alpine_3.5 php5 * Up to
(excluding)
5.6.31-r0
运行在以下环境
系统 alpine_3.6 php5 * Up to
(excluding)
7.1.9-r0
运行在以下环境
系统 alpine_3.7 php5 * Up to
(excluding)
5.6.31-r0
运行在以下环境
系统 alpine_3.8 php5 * Up to
(excluding)
5.6.31-r0
运行在以下环境
系统 amazon_2 oniguruma * Up to
(excluding)
5.9.6-1.amzn2.0.7
运行在以下环境
系统 amazon_AMI php56 * Up to
(excluding)
7.0.21-1.23.amzn1
运行在以下环境
系统 debian DPKG * Up to
(excluding)
6.1.3-2
运行在以下环境
系统 debian_10 libonig * Up to
(excluding)
6.1.3-2
运行在以下环境
系统 debian_11 libonig * Up to
(excluding)
6.1.3-2
运行在以下环境
系统 debian_12 libonig * Up to
(excluding)
6.1.3-2
运行在以下环境
系统 debian_7 libonig * Up to
(excluding)
5.9.1-1+deb7u1
运行在以下环境
系统 debian_8 libonig * Up to
(excluding)
5.9.5-3.2+deb8u1
运行在以下环境
系统 fedora_24 oniguruma * Up to
(excluding)
5.6.31-1.fc24
运行在以下环境
系统 fedora_25 oniguruma * Up to
(excluding)
7.0.21-1.fc25
运行在以下环境
系统 fedora_26 oniguruma * Up to
(excluding)
7.1.7-1.fc26
运行在以下环境
系统 fedora_EPEL_7 jq * Up to
(excluding)
1.6-2.el7
运行在以下环境
系统 opensuse_Leap_42.2 php7-bz2 * Up to
(excluding)
5.5.14-77.6.1
运行在以下环境
系统 suse_11_SP4 php53-odbc * Up to
(excluding)
5.3.17-108.1
运行在以下环境
系统 suse_12 apache2-mod_php5 * Up to
(excluding)
5.5.14-108
运行在以下环境
系统 ubuntu_14.04 php5 * Up to
(excluding)
5.5.9+dfsg-1ubuntu4.22
运行在以下环境
系统 ubuntu_14.04.6_lts libonig * Up to
(excluding)
5.9.1-1ubuntu1.1
运行在以下环境
系统 ubuntu_16.04 php7.0 * Up to
(excluding)
5.9.6-1ubuntu0.1
运行在以下环境
系统 ubuntu_16.04.7_lts libonig * Up to
(excluding)
5.9.6-1ubuntu0.1
运行在以下环境
系统 ubuntu_18.04 libonig * Up to
(excluding)
6.3.0-1
运行在以下环境
系统 ubuntu_18.04.5_lts libonig * Up to
(excluding)
6.3.0-1
阿里云评分
3.1
  • 攻击路径
    远程
  • 攻击复杂度
    复杂
  • 权限要求
    无需权限
  • 影响范围
    有限影响
  • EXP成熟度
    未验证
  • 补丁情况
    官方补丁
  • 数据保密性
    无影响
  • 数据完整性
    无影响
  • 服务器危害
    无影响
  • 全网数量
    100
CWE-ID 漏洞类型
CWE-125 跨界内存读
阿里云安全产品覆盖情况