欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

Linux Kiss Server多个格式串处理漏洞

程序员文章站 2022-04-27 10:37:18
受影响系统: Tomas Brandysky Linux Kiss Server 1.2 描述: -------------------------------------------------------------------------------- BUGTRAQ ID: 28099 ... 08-10-08...
受影响系统:
tomas brandysky linux kiss server 1.2
描述:
--------------------------------------------------------------------------------
bugtraq id: 28099

linux kiss server是用于替换pc-link软件的服务程序,可运行为守护程序或在前台运行。

以前台模式运行的linux kiss server的lks.c文件中的log_message()函数存在格式串处理漏洞,允许攻击者获得非授权访问。

以下为漏洞代码:

function log_message():
if(background_mode == 0)
{
if(type == 'l')
fprintf(stdout,log_msg);

if(type == 'e')
fprintf(stderr,log_msg);
free(log_msg);
}


function kiss_parse_cmd():


/* check full command name */
if (strncmp(cmd, buf, cmd_len))
{
asprintf(&log_msg,"unknow command: `%s'", buf);
log_message(log_msg,'e');
goto error;
}
buf = cmd_len;

因此如果在buf输入类似于%n%n%n的字符串的话,就可以触发这个漏洞。

<*来源:vashnukad (vashnukad@vashnukad.com)

链接:http://secunia.com/advisories/29219/
http://lists.grok.org.uk/pipermail/full-disclosure/2008-march/060550.html
*>

建议:
--------------------------------------------------------------------------------
厂商补丁:

tomas brandysky
---------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://freshmeat.net/projects/lks/