mq_open及linux下posix消息隊列


在服務器的/etc/inclue目錄下發現一個頭文件:mqueue.h,不知道干嘛的就查了一下。得到如下信息:

(1) 是實現linux下posix消息隊列的;具體使用可以man mq_open系列函數;

(2) 2.4的內核對POSIX支持得很不好所以特意升級到2.6
 鏈接時不是加-lposix4,而是-lrt

http://bbs.chinaunix.net/thread-2191087-1-1.html

 

(3)有人提到:“linux的mq_open系列實現真爛”

http://www.newsmth.net/nForum/article/LinuxDev/33733

具體情況需要具體分析,這里不做討論,僅作資料備查。

 

(4)甚至還查到:“Linux Kernel mq_open系統調用拒絕服務漏洞”

Linux Kernel mq_open系統調用拒絕服務漏
發布時間:2006.07.06 19:17 來源:綠盟科技 作者:
受影響系統:
Linux kernel 2.6.9
RedHat Linux WS 4
RedHat Linux ES 4
RedHat Linux Desktop 4
RedHat Linux AS 4
描述:
BUGTRAQ ID: 16283
CVE(CAN) ID: CVE-2005-335
Linux Kernel是開放源碼操作系統Linux所使用的內核。
Linux Kernel對目錄操作的實現上存在漏洞,本地攻擊者可能利用此漏洞對系統進行拒絕服務攻擊。
如果dentry_open函數調用失敗的話,就會多次調用mntput函數。Linux Kernel的mq_open系統調用在這種情況下就可能兩次遞減計數器,這就允許本地攻擊者導致系統忙碌,造成拒絕服務。
<*來源:Alexander Viro (aviro@redhat.com)
鏈接:http://lwn.net/Alerts/168077/?format=printable
*>

建議:
廠商補丁:
RedHat
------
RedHat已經為此發布了一個安全公告(RHSA-2006:0101-01)以及相應補丁:

RHSA-2006:0101-01:Important: kernel security update

鏈接:http://lwn.net/Alerts/168077/?format=printable

http://tech.ccidnet.com/art/782/20040304/599207_1.html

 

(5)其他一些資料:

http://hi.baidu.com/wangjianzhong0/item/4a2e53faa6de08693d1485f4

http://www.lemthy.com/20120609/linux-posix-message-queue-mq_open/

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM