博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mmap_min_addr
阅读量:2457 次
发布时间:2019-05-11

本文共 2707 字,大约阅读时间需要 9 分钟。

Overview

mmap_min_addr is a kernel tunable that specifies the minimum virtual address that a process is allowed to mmap. Allowing processes to map low values increases the security implications of a class of defects known as "kernel NULL pointer dereference" defects. If a malicious local user finds a way to trigger one of these NULL pointer defects, they can exploit it to cause system hangs, crashes, or otherwise make parts of the system unusable. If this user is also able to map low portions of virtual memory, they can often further exploit this issue to gain increased privileges.

The downside to preventing applications from mmap'ing low virtual memory addresses is that certain applications depend on this functionality. dosemu, qemu and wine are three such applications that exist in Debian. See the below.

Current status

Starting with Debian 5.0.4, the 2.6.26 kernel is configured with a default mmap_min_addr of '4096'. If you find this prevents you from running certain applications, you can remove this restriction using the following commands:

# echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf# /etc/init.d/procps restart

If you only need to run the affected application infrequently, you can temporarily decrease the value using the following command:

# sysctl -w vm.mmap_min_addr="0"

You can then reactivate the restriction by running the following command:

# sysctl -w vm.mmap_min_addr="4096"

In Debian 5.0.0 through 5.0.3 inclusive, the 2.6.26 kernel is shipped with a default mmap_min_addr of '0'. This means that the Debian system, by default, is susceptible to these NULL-pointer privilege escalation techniques. It is recommended that you increase the value of mmap_min_addr on your system by upgrading to 5.0.4, see the .

Application specific information

bitbake

From the : might complain that there is a problem with the setting in /proc/sys/vm/mmap_min_addr, which needs to be set to zero.

dosemu

, as shipped in Debian 5.0, must run with vm.mmap_min_addr set to 0 or be executed as root. This limitation has been removed upstream (), so dosemu should work with an increased mmap_min_addr starting with Debian squeeze.

qemu

, as shipped in Debian 5.0, requires low virtual memory mmaps. mmap_min_addr must be set to 0 to run qemu as a non-root user. This limitation has been removed upstream, so qemu should work with an increased mmap_min_addr starting with Debian squeeze.

wine

Only Win16 binaries require the ability to mmap low addresses, Win32 binaries do not. It is recommended that you test your application with the increase mmap_min_addr setting. If the application starts up without issue, then you should not need to remove the mmap_min_addr restriction.

转载地址:http://vashb.baihongyu.com/

你可能感兴趣的文章
amplify color_如何使用Amplify监视Nginx
查看>>
printf格式化字符串_Java printf()–将格式化的字符串打印到控制台
查看>>
Python Matplotlib
查看>>
amqp activemq_Spring AMQP ActiveMQ教程(第1部分)
查看>>
numpy矩阵乘法_NumPy矩阵乘法
查看>>
在Ubuntu 18.04上安装Elasticsearch
查看>>
android系统开机画面_Android开机画面
查看>>
Java字符串替换
查看>>
Pandas DataFrame索引和列属性
查看>>
lxml python_python lxml
查看>>
Java项目Lombok
查看>>
Spring Boot MongoDB
查看>>
sql运算符_SQL运算符
查看>>
Spring Boot Elasticsearch
查看>>
Python XML解析器– ElementTree
查看>>
kotlin web_Kotlin Web应用程序教程
查看>>
sql表达式_SQL表达式
查看>>
java for循环死循环_Java for循环进化
查看>>
Python tarfile模块
查看>>
viewflipper_Android ViewFlipper示例教程
查看>>