Linux eCryptfs工具parse_tag_3_packet()函数堆溢出漏洞 CVE-2009-2407 CNNVD-200907-458

6.9 AV AC AU C I A
发布: 2009-07-31
修订: 2023-02-13

eCryptfs是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\n); 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 =...

0%
暂无可用Exp或PoC
当前有309条受影响产品信息