FreeBSD php5-posix-5.2.6 has known vulnerabilities

时间:2019-11-20 08:54:07  来源:igfitidea点击:

在FreeBSD中安装php5-extensions时,报错如下:

/usr/ports/sysutils/php5-posix
===> php5-posix-5.2.6 has known vulnerabilities:
=> php — input validation error in posix_access function.
Reference: < http://www.FreeBSD.org/ports/portaudit/ee6fa2bd-406a-11dd-936a-0015af872849.html >
=> Please update your ports tree and try again.
*** Error code 1

Stop in /usr/ports/sysutils/php5-posix.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.

原因

由于safe_mode和open_basedir在设计上是不安全的,因此被FreeBSD安全团队视为严重漏洞。

解决方法

执行以下命令更新port树:

# portsnap fetch update
# portaudit -Fda

如果仍然看到错误,在/etc/make.conf文件中添加以下代码来暂时禁用错误:

# get around php5-posix error 
.if !empty(.CURDIR:M*sysutils/php5-posix*)
DISABLE_VULNERABILITIES=yes
.endif

然后再试着重建ports:

# cd /usr/ports/lang/php5-extensions
# make install clean

另外一种解决方法是。
在构建时,禁用VULNERABILITIES:

# make -DDISABLE_VULNERABILITIES install