Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / Linux eCryptfs工具parse_tag_3_packet()函数堆溢出漏洞

发布日期:2009-07-28
更新日期:2009-07-29受影响系统:
Linux kernel 2.6.30.3
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 35850eCryptfs是Linux平台下的企业级加密文件系统。eCryptfs的密钥管理代码中的parse_tag_3_packet函数没有检查tag 3报文所包含的加密密钥大小是否大于ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES就将其拷贝到了new_auth_tok结构中,这可能触发堆溢出漏洞。fs/ecryptfs/keystore.c
--
static int
parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat,
           unsigned char *data, struct list_head *auth_tok_list,
           struct ecryptfs_auth_tok **new_auth_tok,
           size_t *packet_size, size_t max_packet_size)
{
    size_t body_size;
    struct ecryptfs_auth_tok_list_item *auth_tok_list_item;
    size_t length_size;
    int rc = 0;    ...    /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or
     * at end of function upon failure */
    auth_tok_list_item =
        kmem_cache_zalloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL);
    if (!auth_tok_list_item) {
        printk(KERN_ERR "Unable to allocate memory ");
        rc = -ENOMEM;
        goto out;
    }
    (*new_auth_tok) = &auth_tok_list_item->auth_tok;
    rc = ecryptfs_parse_packet_length(&data[(*packet_size)], &body_size,
                      &length_size);
    if (rc) {
        printk(KERN_WARNING "Error parsing packet length; rc = [%d] ",
               rc);
        goto out_free;
    }    ...    (*new_auth_tok)->session_key.encrypted_key_size =
        (body_size - (ECRYPTFS_SALT_SIZE + 5));
    if (unlikely(data[(*packet_size)++] != 0x04)) {
        printk(KERN_WARNING "Unknown version number [%d] ",
               data[(*packet_size) - 1]);
        rc = -EINVAL;
        goto out_free;
    }    ...        /* Friendly reminder:
         * (*new_auth_tok)->session_key.encrypted_key_size =
         *         (body_size - (ECRYPTFS_SALT_SIZE + 5)); */
        memcpy((*new_auth_tok)->session_key.encrypted_key,
               &data[(*packet_size)],
               (*new_auth_tok)->session_key.encrypted_key_size);
        (*packet_size) +=
            (*new_auth_tok)->session_key.encrypted_key_size;    ...
--<*来源:Ramon de Carvalho Valle (ramon@risesecurity.org)
 
  链接:http://marc.info/?l=bugtraq&m=124881564919693&w=2
*>建议:
--------------------------------------------------------------------------------
厂商补丁:Linux
-----
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-doc-2.6.27_2.6.27-14.37_all.deb
http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-2.6.27-14_2.6.27-14.37_all.deb
http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-source-2.6.27_2.6.27-14.37_all.deb[注意]Flash 0day 漏洞攻击首现国内互联网Linux eCryptfs工具parse_tag_11_packet函数栈溢出漏洞相关资讯      Linux漏洞 
  • 敲击28次退格键之后:Linux漏洞可  (12/18/2015 11:22:28)
  • Linux出现重大漏洞 GHOST ?  (01/30/2015 18:35:07)
  • Linux 2.6.31本地代码执行漏洞(  (07/07/2014 07:51:17)
  • Red Hat Linux 修补“libuser”库  (07/26/2015 06:39:34)
  • 红帽反驳:“Grinch(鬼精灵)”算  (12/30/2014 07:38:23)
  • Linux gcc++漏洞:普通用户获得  (08/16/2013 11:57:41)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容