Dnsmasq TFTP服务远程NULL指针引用漏洞

漏洞起因
设计错误
 
影响系统
Dnsmasq 2.49
Dnsmasq 2.48
Dnsmasq 2.47
Dnsmasq 2.46
Dnsmasq 2.45
Dnsmasq 2.44
Dnsmasq 2.43
Dnsmasq 2.42
Dnsmasq 2.41
Dnsmasq 2.40
 
不受影响系统
Dnsmasq 2.50
 
危害
远程攻击者可以利用漏洞使应用程序崩溃。
 
攻击所需条件
攻击者必须访问Dnsmasq。
 
漏洞信息
Dnsmasq是一款轻量级的DNS服务程序。
Dnsmasq存在Null指针应用漏洞,远程攻击者可以利用漏洞使服务程序崩溃。
问题代码如下:
   
while ((opt = next(&p, end)))
 {
   if (strcasecmp(opt, "blksize") == 0 &&
       (opt = next(&p, end)) &&
       !(daemon->options & OPT_TFTP_NOBLOCK))
     {
       transfer->blocksize = atoi(opt);
       if (transfer->blocksize < 1)
         transfer->blocksize = 1;
       if (transfer->blocksize > (unsigned)daemon->packet_buff_sz – 4)
          transfer->blocksize = (unsigned)daemon->packet_buff_sz – 4;
       transfer->opt_blocksize = 1;
       transfer->block = 0;
     }
  if (strcasecmp(opt, "tsize") == 0 && next(&p, end) &&
      !transfer->netascii)
     {
       transfer->opt_transize = 1;
       transfer->block = 0;
     }
         }
如果返回NULL,opt = next(&p, end)检查会失败而导致strcasecmp(opt, "tsize")引用NULL指针使应用程序崩溃。
 
测试方法
 
厂商解决方案
用户可联系供应商升级到Dnsmasq 2.50版本:
http://www.thekelleys.org.uk/dnsmasq/doc.html
 
漏洞提供者
Anonymous
  

发表评论?

0 条评论。

发表评论