网上做调查赚钱的网站有哪些,市场营销是做什么的,怎样用word2003做网站,怎么做网站何做网站安全之安全(security)博客目录导读
ATF(TF-A)安全通告汇总
目录
一、ATF(TF-A)安全通告 TFV-1 (CVE-2016-10319)
二、CVE-2016-10319 一、ATF(TF-A)安全通告 TFV-1 (CVE-2016-10319) Title 错误的固件更新SMC可能导致意外的大数据拷贝到安全内存中 CVE ID CVE-2016-10319 …安全之安全(security²)博客目录导读
ATF(TF-A)安全通告汇总
目录
一、ATF(TF-A)安全通告 TFV-1 (CVE-2016-10319)
二、CVE-2016-10319 一、ATF(TF-A)安全通告 TFV-1 (CVE-2016-10319) Title 错误的固件更新SMC可能导致意外的大数据拷贝到安全内存中 CVE ID CVE-2016-10319 Date 18 Oct 2016 Versions Affected v1.2 and v1.3 (since commit 48bfb88) Configurations Affected 使用AArch64 BL1的平台加上在BL31之前执行的不受信任的非安全世界固件更新代码 Impact 将意外的大数据复制到BL1平台代码报告的空闲安全内存中 Fix Version Pull Request #783 Credit IOActive
二、CVE-2016-10319 通用可信固件(TF-A) BL1代码包含一个SMC接口该接口在冷复位后短暂可用以支持固件更新(Firmware UpdateFWU)功能(也称为恢复模式)。这允许在非安全世界中下实现大多数FWU功能同时在BL1中保留基本的镜像身份验证功能。当冷启动到达EL3 Runtime Software(如AArch64系统上的BL31)时FWU SMC接口将被EL3 Runtime SMC接口取代。平台可以选择使用多少FWU功能(如果有的话)。 BL1 FWU SMC处理代码目前只支持AArch64包含几个漏洞当所有以下条件满足时可能会被利用 1. 平台代码使用启用了TRUSTED_BOARD_BOOT构建选项的TF BL1。 2. 平台代码安排在BL31启动之前在冷启动路径上执行不受信任的非安全世界FWU代码。从这个意义上说不可信是指不在ROM中或未经过身份验证或已被攻击者以其他方式执行的代码。 3. 平台代码从bl1_plat_mem_check()的ARM平台版本复制下面描述的不安全模式。 这些漏洞包括在处理FWU_SMC_IMAGE_COPY SMC时输入验证检查中的潜在整数溢出。SMC实现的目的是将镜像复制到安全内存中以供后续身份验证但是这些漏洞可能允许攻击者将意外的大数据复制到安全内存中。请注意需要一个单独的漏洞来利用这些漏洞例如一种让系统根据意外的安全内存内容改变其行为的方法。 其中两个漏洞位于bl1/bl1_fwu.c中的bl1_fwu_image_copy()函数。下面列出了这些参考v1.3标记版本的代码
1Line 155:
/** If last block is more than expected then* clip the block to the required image size.*/
if (image_desc-copied_size block_size image_desc-image_info.image_size) {block_size image_desc-image_info.image_size -image_desc-copied_size;WARN(BL1-FWU: Copy argument block_size remaining image size. Clipping block_size\n);
}/* Make sure the image src/size is mapped. */
if (bl1_plat_mem_check(image_src, block_size, flags)) {WARN(BL1-FWU: Copy arguments source/size not mapped\n);return -ENOMEM;
}INFO(BL1-FWU: Continuing image copy in blocks\n);/* Copy image for given block size. */
base_addr image_desc-copied_size;
image_desc-copied_size block_size;
memcpy((void *)base_addr, (const void *)image_src, block_size);
... 当在多个smc上以块方式执行镜像复制操作时执行此代码片段。block_size是一个SMC参数因此可能被攻击者控制。一个非常大的值可能会导致第一个if语句中的整数溢出这将绕过检查允许将未剪切的block_size传递给bl1_plat_mem_check()。如果bl1_plat_mem_check()也通过了这可能会导致意外的大数据拷贝到安全内存中。
2Line 206:
/* Make sure the image src/size is mapped. */
if (bl1_plat_mem_check(image_src, block_size, flags)) {WARN(BL1-FWU: Copy arguments source/size not mapped\n);return -ENOMEM;
}/* Find out how much free trusted ram remains after BL1 load */
mem_layout bl1_plat_sec_mem_layout();
if ((image_desc-image_info.image_base mem_layout-free_base) ||(image_desc-image_info.image_base image_size mem_layout-free_base mem_layout-free_size)) {WARN(BL1-FWU: Memory not available to copy\n);return -ENOMEM;
}/* Update the image size. */
image_desc-image_info.image_size image_size;/* Copy image for given size. */
memcpy((void *)base_addr, (const void *)image_src, block_size);
... 该代码片段在镜像复制操作的第一次调用期间执行。block_size和image_size都是SMC参数。一个非常大的image_size值可能会导致第二个if语句中的整数溢出这将绕过检查允许继续执行。如果bl1_plat_mem_check()也通过了这可能会导致意外的大数据拷贝到安全内存中。 如果平台对bl1_plat_mem_check()的实现是正确的那么它可能有助于防止上述2个漏洞被利用。然而此函数的ARM平台版本包含类似的漏洞 plat/arm/common/arm_bl1_fwu.c中bl1_plat_mem_check()函数的第88行
while (mmap[index].mem_size) {if ((mem_base mmap[index].mem_base) ((mem_base mem_size) (mmap[index].mem_base mmap[index].mem_size)))return 0;index;
}
... 这个函数检查传递的内存区域是否在ARM平台映射的一个区域内。这里mem_size可以是从bl1_fwu_image_copy()传递过来的block_size。mem_size的值太大可能导致整数溢出导致函数错误地返回success。复制此不安全模式的平台将具有相同的漏洞。 参考9.1. Advisory TFV-1 (CVE-2016-10319) — Trusted Firmware-A 2.9.0 documentation