[BUG REPORT] Integer overflow in page_align_up
#1077
Labels
A-mm
Area: 内存管理子系统
bug-report
这是一个bug报告(如果确认是一个bug,请管理人员添加`bug` label)
needs-triage
这个问题可能需要分类处理。如果已经完成分类,请移除它。
描述错误/Describe the bug
There is an integer overflow in
page_align_up()
at kernel/src/libs/align.rs:135 when program calls memory related syscall (i.e.,mmap
,munmap
, andmprotect
) with largelen
.DragonOS/kernel/src/libs/align.rs
Lines 133 to 136 in 72423f9
请填写您的电脑的信息/Environment
重现步骤/To Reproduce
munmap
with largelen
期望行为/Expected behavior
DragonOS should check the add behavior first and not overflow here.
屏幕截图/Log
I add log before and after the alignment:
The text was updated successfully, but these errors were encountered: