-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
enhancementNew feature or requestNew feature or requestpriority: lowLow priority issueLow priority issue
Description
由于目前内核和普通线程公用一个内存分配器,如果普通线程错误的操作内存,会直接影响到内核的稳定。
比如,shell中可以释放任意内存,也能多次释放同一内存地址(未如期望报告double free):
> dealloc 0x10000000
> dealloc 0x20000000
> dealloc 0x21000000
> dealloc 0x21100000
> dealloc 0x1000000
> dealloc 0x1100000
> dealloc 0x1200000
> alloc 1024 8
0x2111d008
> dealloc 0x2111d008
> dealloc 0x2111d008
> dealloc 0x2111d008
在目前kernel架构下,在BlockHeader中增加一个线程id,用来进行权限鉴别,似乎是个成本较低且有一定效果的方案。
当然,加入id并不能防止恶意线程通过各种手段修改线程id来绕过,但是能防止普通线程的无恶意错误内存操作。
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority: lowLow priority issueLow priority issue