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/

 

 

 

posted @ 2012-10-08 17:18    阅读(5618)  评论(0编辑  收藏  举报