漏洞信息
# hugetlbfs:不要从页面缓存中删除错误页面
## 漏洞概述
在Linux内核中,修复了一个与hugetlbfs相关的漏洞。当发现HugeTLB页面中有损坏时,会将其从页面缓存中删除,这会导致未来的读取或映射操作分配新的页面而不是通知用户页面已被损坏,从而导致内存损坏。
## 影响版本
此漏洞影响所有使用HugeTLBFS功能的Linux内核版本。
## 细节
当前逻辑是当在HugeTLB页面中发现损坏时会将其移出页面缓存。这会导致之后再次尝试映射或读取该页面时分配新的页面,而不是提示用户该页面已损坏。该修复措施是让损坏页面保留在页面缓存中。当用户尝试通过系统调用使用损坏的HugeTLB页面时,系统调用会返回`EIO`错误码。如果尝试映射这个页面,线程会收到一个`BUS_MCEERR_AR`类型的`SIGBUS`信号。
## 影响
修复之前,尝试使用损坏的HugeTLB页面可能导致内存分配错误和误导性的行为。修复之后,将会适当地向用户报告错误,并避免内存损坏。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
hugetlbfs: don't delete error page from pagecache
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
hugetlbfs: don't delete error page from pagecache
This change is very similar to the change that was made for shmem [1], and
it solves the same problem but for HugeTLBFS instead.
Currently, when poison is found in a HugeTLB page, the page is removed
from the page cache. That means that attempting to map or read that
hugepage in the future will result in a new hugepage being allocated
instead of notifying the user that the page was poisoned. As [1] states,
this is effectively memory corruption.
The fix is to leave the page in the page cache. If the user attempts to
use a poisoned HugeTLB page with a syscall, the syscall will fail with
EIO, the same error code that shmem uses. For attempts to map the page,
the thread will get a BUS_MCEERR_AR SIGBUS.
[1]: commit a76054266661 ("mm: shmem: don't truncate page if memory failure happens")
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于hugetlbfs错误删除页面,可能导致内存损坏。
CVSS信息
N/A
漏洞类别
其他