Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
手册页中mmap提到的 MAP_DENYWRITE 函数可能会导致拒绝服务攻击。但为什么?
mmap
MAP_DENYWRITE该标志被忽略。(很久以前,它表示尝试写入底层文件应该会因 ETXTBUSY 而失败。但这是拒绝服务攻击的来源。)
MAP_DENYWRITE将锁定文件并阻止其他进程将其写入。因此,它构成了拒绝服务的基础(拒绝其他进程写入文件)。
MAP_DENYWRITE