漏洞信息详情
Linux Kernel isdn_net.c文件本地内核溢出漏洞
- CNNVD编号:CNNVD-200711-295
- 危害等级: 中危
- CVE编号:
CVE-2007-6063
- 漏洞类型:
缓冲区溢出
- 发布时间:
2007-11-20
- 威胁类型:
本地
- 更新时间:
2009-02-18
- 厂 商:
linux - 漏洞来源:
Venustech AD-LAB -
漏洞简介
Linux kernel是美国Linux基金会发布的开源操作系统Linux所使用的内核。NFSv4 implementation是其中的一个分布式文件系统协议。
Linux Kernel实现上存在漏洞,本地攻击者可能利用此漏洞提升权限。
Linux Kernel的drivers/isdn/i4l/isdn_net.c文件中的isdn_net_setcfg()函数在处理发送给ISDN伪设备(/dev/isdnctrl)的IOCTL配置请求时存在缓冲区溢出漏洞:
isdn_ioctl (drivers/isdn/i4l/isdn_common.c):
1270 isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
…
…
1410 case IIOCNETSCF:
1411 /* Set configurable parameters of a network-interface */
1412 if (arg) {
1413 if (copy_from_user(&cfg, argp, sizeof(cfg))) *** <- cfg is user-controlled
1414 return -EFAULT;
1415 return isdn_net_setcfg(&cfg); *** <-call isdn_net_setcfg()
1416 } else
1417 return -EINVAL;
…
在1413行,cfg是从用户空间读取的,因此受用户控制。在1415行调用了isdn_net_setcfg()函数,&cfg作为参数传送给了isdn_net_setcfg()。
isdn_net_setcfg (drivers/isdn/i41/isdn_net.c):
2664 isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
2665 {
…
2777 if (cfg->exclusive > 0) {
2778 unsigned long flags;
2779
2780 /* If binding is exclusive, try to grab the channel */
2781 spin_lock_irqsave(&dev->lock, flags);
2782 if ((i = isdn_get_free_channel(ISDN_USAGE_NET,
2783 lp->l2_proto, lp->l3_proto, drvidx,
2784 chidx, lp->msn)) < 0) {
2785 /* Grab failed, because desired channel is in use */
2786 lp->exclusive = -1;
2787 spin_unlock_irqrestore(&dev->lock, flags);
2788 return -EBUSY;
2789 }
2790 /* All went ok, so update isdninfo */
2791 dev->usage[i] = ISDN_USAGE_EXCLUSIVE;
2792 isdn_info_update();
2793 spin_unlock_irqrestore(&dev->lock, flags);
2794 lp->exclusive = i;
2795 } else {
2796 /* Non-exclusive binding or unbind. */
2797 lp->exclusive = -1;
2798 if ((lp->pre_device != -1) && (cfg->exclusive == -1)) {
2799 isdn_unexclusive_channel(lp->pre_device, lp->pre_channel);
2800 isdn_free_channel(lp->pre_device, lp->pre_channel, ISDN_USAGE_NET);
2801 drvidx = -1;
2802 chidx = -1;
2803 }
2804 }
2805 strcpy(lp->msn, cfg->eaz); *** <- Possible overrun of lp->msn by cfg-eaz
2806 lp->pre_device = drvidx;
2807 lp->pre_channel = chidx;
2808 lp->onhtime = cfg->onhtime;
2809 lp->charge = cfg->charge;
…
2884 return -ENODEV;
2885 }
在2805行调用了strcpy(),lp->msn参数大小为32,cfg->eaz大小为256。由于*cfg的数据是用户可控的,因此cfg->eaz也是用户可控的,这样就可以通过cfg->eaz字符串覆盖目标字符串lp->msn。如果cfg->eaz字符串的长度大于32的话,就可以触发缓冲区溢出。
漏洞公告
目前厂商已经发布了升级补丁以修复此安全问题,补丁获取链接:
http://rhn.redhat.com/errata/RHSA-2008-0154.html
参考网址
来源: REDHAT
名称: RHSA-2008:0973
链接:http://www.redhat.com/support/errata/RHSA-2008-0973.html
来源: REDHAT
名称: RHSA-2008:0787
链接:http://www.redhat.com/support/errata/RHSA-2008-0787.html
来源: MANDRIVA
名称: MDVSA-2008:112
链接:http://www.mandriva.com/security/advisories?name=MDVSA-2008:112
来源: SECUNIA
名称: 33280
链接:http://secunia.com/advisories/33280
来源: SECUNIA
名称: 33201
链接:http://secunia.com/advisories/33201
来源: bugzilla.kernel.org
链接:http://bugzilla.kernel.org/show_bug.cgi?id=9416
来源: UBUNTU
名称: USN-578-1
链接:http://www.ubuntu.com/usn/usn-578-1
来源: UBUNTU
名称: USN-574-1
链接:http://www.ubuntu.com/usn/usn-574-1
来源: BID
名称: 26605
链接:http://www.securityfocus.com/bid/26605
来源: REDHAT
名称: RHSA-2008:0154
链接:http://www.redhat.com/support/errata/RHSA-2008-0154.html
来源: MANDRIVA
名称: MDVSA-2008:008
链接:http://www.mandriva.com/security/advisories?name=MDVSA-2008:008
来源: VUPEN
名称: ADV-2007-4046
链接:http://www.frsirt.com/english/advisories/2007/4046
来源: DEBIAN
名称: DSA-1504
链接:http://www.debian.org/security/2008/dsa-1504
来源: DEBIAN
名称: DSA-1503
链接:http://www.debian.org/security/2008/dsa-1503
来源: DEBIAN
名称: DSA-1436
链接:http://www.debian.org/security/2007/dsa-1436
来源: SECUNIA
名称: 29236
链接:http://secunia.com/advisories/29236
来源: SECUNIA
名称: 29058
链接:http://secunia.com/advisories/29058
来源: SECUNIA
名称: 28971
链接:http://secunia.com/advisories/28971
来源: SECUNIA
名称: 28806
链接:http://secunia.com/advisories/28806
来源: SECUNIA
名称: 28748
链接:http://secunia.com/advisories/28748
来源: SECUNIA
名称: 28706
链接:http://secunia.com/advisories/28706
来源: SECUNIA
名称: 28141
链接:http://secunia.com/advisories/28141
来源: SECUNIA
名称: 27912
链接:http://secunia.com/advisories/27912
来源: SECUNIA
名称: 27842
链接:http://secunia.com/advisories/27842
来源: REDHAT
名称: RHSA-2008:0055
链接:http://rhn.redhat.com/errata/RHSA-2008-0055.html
来源: SUSE
名称: SUSE-SA:2008:006
链接:http://lists.opensuse.org/opensuse-security-announce/2008-02/msg00002.html
来源: SUSE
名称: SUSE-SA:2007:064
链接:http://lists.opensuse.org/opensuse-security-announce/2007-12/msg00001.html