WO2019233022A1 - 防回滚方法及系统 - Google Patents

防回滚方法及系统 Download PDF

Info

Publication number
WO2019233022A1
WO2019233022A1 PCT/CN2018/113152 CN2018113152W WO2019233022A1 WO 2019233022 A1 WO2019233022 A1 WO 2019233022A1 CN 2018113152 W CN2018113152 W CN 2018113152W WO 2019233022 A1 WO2019233022 A1 WO 2019233022A1
Authority
WO
WIPO (PCT)
Prior art keywords
version number
application
version
storage unit
rollback
Prior art date
Application number
PCT/CN2018/113152
Other languages
English (en)
French (fr)
Inventor
蒋培福
朱朋光
曹锜
万勇
Original Assignee
晶晨半导体(上海)股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 晶晨半导体(上海)股份有限公司 filed Critical 晶晨半导体(上海)股份有限公司
Publication of WO2019233022A1 publication Critical patent/WO2019233022A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities

Definitions

  • the invention relates to the field of software security, in particular to an anti-rollback method and system for an application program.
  • TEE Trusted Execution environment
  • DRM digital rights management
  • TA Trusted Application
  • trusted applications support subsequent version upgrades, they do not support the version anti-rollback mechanism, so that the vandal can replace the new version with the old version of the trusted application version, thereby bypassing the vulnerability repair.
  • User information security poses a danger.
  • the invention provides an anti-rollback method, and provides a storage unit for storing a version form of a first version number of an application program.
  • the anti-rollback method includes the following steps:
  • the storage unit uses an embedded multimedia memory card, and the version form is stored in a physical partition of the embedded multimedia memory card that supports playback protection.
  • the method further includes:
  • Verify the signature of the application and obtain the second version number of the application if verified; if the verification fails, prohibit the application from loading.
  • an asymmetric encryption algorithm and / or a secure hash algorithm is used to verify the signature of the application program.
  • the second version number is greater than the minimum first version number
  • update the version form update the second version number to the minimum first version number, and allow the application to load .
  • the method further includes:
  • Triggering the application to load in a trusted execution environment Triggering the application to load in a trusted execution environment.
  • the invention also provides a system for preventing rollback, including:
  • a storage unit configured to store a version form of a first version number of an application program
  • An obtaining unit configured to obtain a second version number of the application program
  • a processing unit connected to the obtaining unit and the storage unit, and configured to compare the second version number with a smallest first version number in a version form associated with the application in the storage unit, when When the second version number is smaller than the minimum first version number, the application program is prohibited from being loaded.
  • the storage unit uses an embedded multimedia memory card, and the version form is stored in a physical partition of the embedded multimedia memory card that supports playback protection.
  • it further includes:
  • the verification unit is connected to the acquisition unit and is used to verify the signature of the application.
  • it further includes:
  • An update unit is connected to the processing unit, and when the second version number is greater than the minimum first version number, the update unit is used to update the version form to update the second version number to the minimum
  • the first version number allows the application to load.
  • the version form of the application program is stored in the storage unit to ensure that the security of the application to be loaded is detected according to the version form when the application program is loaded, so that the application program can be prohibited from being loaded in the case of finding a vulnerability or a security risk purpose.
  • FIG. 1 is a method flowchart of an anti-rollback method according to the present invention
  • FIG. 2 is a block diagram of an embodiment of the anti-rollback system according to the present invention.
  • FIG. 3 is a working principle diagram of an embodiment of the anti-rollback system according to the present invention.
  • an anti-rollback method provides a storage unit for storing a version form of a first version number of an application program (that is, a version table Version table, referred to as VT); the method includes:
  • Step S1. Obtain a second version number of the application
  • Step S2. Compare the second version number with the minimum first version number in the version form associated with the application in the storage unit. When the second version number is less than the minimum first version number, the application is prohibited from loading.
  • the application corresponding to the first version number stored in the version form is a trusted application.
  • the trusted application's header information carries the second version number of the trusted application (also known as the current version number Current, Version Number, or CVN for short), and the header information is signed together with the payload of the trusted application.
  • the storage unit uses an embedded multimedia memory card (EMMC), and the version form is stored in a physical partition (Replay Protected Memory Block (RPMB)) of the embedded multimedia memory card that supports playback protection.
  • RPMB is a special partition on EMMC that supports playback protection.
  • the storage unit stores a version form of the application without security risks.
  • the version form of the trusted application is stored in the RPMB partition of EMMC.
  • the data integrity is ensured from the hardware level through RPMB technology.
  • the external version form cannot be tampered with to ensure the authenticity and reliability of the data in the version form.
  • the version form of the application program is stored in the storage unit to ensure that the security of the application to be loaded is detected according to the version form when the application program is loaded, so that the application program can be prohibited from being loaded in the case of finding a vulnerability or a potential security hazard. the goal of.
  • the method before performing step S1 to obtain the second version number of the application program, the method further includes:
  • Step A Verify the signature of the application, and obtain the second version number of the application if the verification is passed; if the verification fails, prohibit the application from loading.
  • an asymmetric encryption algorithm (RSA)
  • a secure hash algorithm may be used to verify the signature of the application.
  • an asymmetric encryption RSA-2048 algorithm can be used for verification; a secure hash algorithm (also known as a hash function SHA256) can also be used for verification. Therefore, the security and reliability of the verification can be ensured, the integrity and authenticity of the trusted application header information and the trusted application payload can be ensured, and the second version number contained in the trusted application header information cannot be tampered with externally.
  • a secure hash algorithm also known as a hash function SHA256
  • the method before performing step S1 to obtain the second version number of the application program, the method further includes:
  • Step B Trigger the application to load in the trusted execution environment.
  • trusted applications can be triggered to load by other applications, and the Rich Execution Environment (REE) is transferred to the TEE environment for loading.
  • REE Rich Execution Environment
  • the version detection process of trusted applications is completed in the TEE environment to ensure that the entire inspection process cannot be hijacked or changed by external parties.
  • the REE environment generally refers to operating systems such as Linux and Android.
  • the version form is updated to update the second version number to the minimum first version number (Minimum Version Number, referred to as MVN), allowing the application to load .
  • Minimum Version Number referred to as MVN
  • the comparison of the version numbers is performed in the TEE environment.
  • the CVN of the trusted application is obtained from the trusted application header information; the version table of the trusted application is read from the RPMB partition of the EMMC.
  • the Universal Unique Identifier (Universally Identifier, UUID for short) of the trusted application retrieved the MVN of the trusted application. Compare CVN and MVN. If CVN is equal to MVN, allow trusted applications to load; if CVN is greater than MVN, the security system will set the MVN of trusted applications to CVN, and update the version form.
  • the version check passes to allow trust.
  • the application loads and the trusted application runs normally.
  • the version check fails, the trusted application is prohibited from loading, an error message is returned, and the trusted application fails to load.
  • the present invention also provides a system for preventing rollback, including:
  • a storage unit 1 for storing a version form of a first version number of an application program
  • An obtaining unit 3 configured to obtain a second version number of the application program
  • the processing unit 2 is connected to the acquisition unit 3 and the storage unit 1 to compare the second version number with the smallest first version number in the version form associated with the application program in the storage unit 1. When the second version number is smaller than the minimum When the first version number, the application is prohibited from loading.
  • the storage unit 1 uses an embedded multimedia memory card, and the version sheet is stored in a physical partition of the embedded multimedia memory card that supports playback protection.
  • the anti-rollback system may be a mobile terminal.
  • the storage unit 1 uses an embedded multimedia memory card, and the version sheet is stored in a physical partition of the embedded multimedia memory card that supports playback protection.
  • it further includes:
  • the verification unit 5 is connected to the acquisition unit 3 and is used to verify the signature of the application program.
  • an asymmetric encryption algorithm and / or a secure hash algorithm can be used to verify the signature of the application.
  • the asymmetric encryption RSA-2048 algorithm can be used for verification; a secure hash algorithm can also be used for verification. Therefore, the security and reliability of the verification can be ensured, the integrity and authenticity of the trusted application header information and the trusted application payload can be ensured, and the second version number contained in the trusted application header information cannot be tampered with externally.
  • it further includes:
  • the update unit 4 is connected to the processing unit 2. When the second version number is greater than the minimum first version number, the update unit 4 is used to update the version form, update the second version number to the minimum first version number, and allow the application to load.
  • the comparison of the version numbers is performed in a TEE environment.
  • the CVN and MVN are compared. If CVN is equal to MVN, trusted applications are allowed to load. If CVN is greater than MVN, the security system will set trusted applications.
  • the MVN of the program is CVN, and the version form is updated. The version check passes, allowing the trusted application to load, and the trusted application runs normally.
  • the trusted application can be triggered to be loaded by other applications (such as: client program, Client Application, referred to as CA, CA runs in the REE environment), as an example and not a limitation, for example: the trusted application TA is a payment application,
  • the client program CA is an electricity bill inquiry application.
  • the electricity bill inquiry program can be used to query the electricity bill to be paid.
  • the electricity bill inquiry program can trigger the payment application to be loaded in the TEE environment.
  • the security system will pay the application's
  • the current version number is compared with the version number in the storage unit. Only when the current program version number is greater than or equal to the version number in the storage unit, the payment application will be successfully loaded, and the payment function will be implemented. By using the application version in the storage unit Number will be updated synchronously; otherwise the loading fails. This mechanism can ensure that outdated payment applications cannot be loaded and run normally, preventing the version of the payment application from being rolled back.
  • trusted applications can be run in the Secure OS security system and loaded from a rich execution environment to a TEE environment.
  • the version detection process of trusted applications is completed in the TEE environment to ensure that the entire inspection process cannot be hijacked or changed by external parties.
  • Step 1 The CA client program tee_demo initiates a request from the REE environment, triggers the loading of the TA trusted application, and loads 8aaaf200-2450-11e4-abe2-0002a5d5c51b.ta from the REE environment into the TEE environment;
  • Step 2 The TEE security system performs digital signature verification on 8aaaf200-2450-11e4-abe2-0002a5d5c51b.ta. If this verification process fails, an error is returned; if the verification is successful, it continues;
  • Step 3 The TEE security system reads the TA header information of TA 8aaaf200-2450-11e4-abe2-0002a5d5c51b to obtain the CVN value of the TA; the TEE security system reads the TA version table VT from the RPMB, and queries the UUID as 8aaaf200-2450-11e4 -abe2-0002a5d5c51b MVN value;
  • Step 4 The TEE security system compares the values of CVN and MVN.
  • the TEE security system updates the VT in the VT with the UUID of fd74bb1a32b4ae84457ff186b4efe7e7a661cd50 to 2, and the version check passes;
  • Step 5 The TEE security system loads the TA, and the TA starts to operate normally.
  • the header information of the trusted application program of the anti-rollback method of the present invention carries the current version number, and the storage unit stores the universally unique identifier of the trusted program and the minimum version number that the program can run.
  • the security system reads the version number in the program header information and compares it with the version number in the storage unit. Only when the current program version number is greater than or equal to the version number in the storage unit, can the Only when the application is successfully loaded, the application version number in the storage unit will be updated synchronously; otherwise, the loading fails. This mechanism can ensure that outdated trusted applications cannot be loaded and run normally, preventing the versions of trusted applications from being rolled back.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

一种防回滚方法及系统,涉及软件安全领域。所述防回滚方法提供一存储单元(1),用以存储应用程序的第一版本号的版本表单;所述防回滚方法包括下述步骤:获取所述应用程序的第二版本号;将所述第二版本号与所述存储单元中与所述应用程序关联的版本表单中的最小第一版本号的进行比较,当所述第二版本号小于所述最小第一版本号时,禁止所述应用程序加载。通过存储单元存储应用程序的版本表单,以保证在应用程序加载时依据版本表单检测待加载应用程序的安全性,实现在发现漏洞或安全隐患的情况下能够禁止应用程序加载的目的。

Description

防回滚方法及系统 技术领域
本发明涉及软件安全领域,尤其涉及一种应用程序的防回滚方法及系统。
背景技术
网络安全问题越来越受到大众的关注。随着网络技术的发展,家庭多媒体系统、手机等智能系统的普及,通过家庭多媒体系统或电脑手机进行在线购物,缴纳家庭水电费用,购买播放数字影音作品等新型消费购物方式已经逐渐走入了家庭生活。因而移动终端的安全问题越来越受到重视,目前主流的家庭多媒体系统和手机平板等移动终端系统中,普遍采用了ARM(全称:Advanced RISC Machines)处理器的TrustZone技术构建可信执行环境(Trusted execution environment,简称TEE),让在线支付、数字版权管理(Digital Rights Management,简称DRM)播放等作为可信应用程序(Trusted Application,简称TA)在TEE环境中执行,增强其安全性。其中,TrustZone技术是系统范围的安全方法,针对高性能计算平台上的大量应用,包括安全支付、DRM、企业服务和基于Web的服务。
现有的一些系统中,其可信应用程序存在如下的安全问题:
1)某些系统上,可信应用程序固化在系统上,无法通过更新应用程序的手段来修补漏洞,若应用发现安全问题,那么这类问题无法通过升级方式修复,只能系统返厂;
2)某些系统上,可信应用程序虽然支持后续版本升级,不过不支持版本 防回滚机制,这样破坏者能够用旧版本的可信应用程序版本替换新版本,从而绕过漏洞修复,对用户信息安全造成危害。
发明内容
针对可通过将有问题的旧版本的软件重新刷回系统从而危害用户个人信息安全的问题,现提供一种旨在实现当发现漏洞或安全隐患的情况下能够禁止应用程序加载保证用户信息安全的防回滚方法及系统。
本发明提供了一种防回滚方法,提供一存储单元,用以存储应用程序的第一版本号的版本表单;所述防回滚方法包括下述步骤:
获取所述应用程序的第二版本号;
将所述第二版本号与所述存储单元中与所述应用程序关联的版本表单中的最小第一版本号的进行比较,当所述第二版本号小于所述最小第一版本号时,禁止所述应用程序加载。
优选的,所述存储单元采用嵌入式多媒体存储卡,所述版本表单存储于所述嵌入式多媒体存储卡支持回放保护的物理分区中。
优选的,获取所述应用程序的第二版本号之前,还包括:
验证所述应用程序的签名,若通过验证则获取所述应用程序的第二版本号;若验证失败则禁止所述应用程序加载。
优选的,采用非对称加密算法,和/或安全散列算法验证所述应用程序的签名。
优选的,当所述第二版本号大于所述最小第一版本号时,则更新所述版本表单,将所述第二版本号更新为所述最小第一版本号,允许所述应用程序加载。
优选的,获取所述应用程序的第二版本号之前还包括:
触发所述应用程序在可信执行环境加载。
本发明还提供了一种防回滚的系统,包括:
存储单元,用以存储应用程序的第一版本号的版本表单;
获取单元,用以获取所述应用程序的第二版本号;
处理单元,连接所述获取单元和所述存储单元,用以将所述第二版本号与所述存储单元中与所述应用程序关联的版本表单中的最小第一版本号的进行比较,当所述第二版本号小于所述最小第一版本号时,禁止所述应用程序加载。
优选的,所述存储单元采用嵌入式多媒体存储卡,所述版本表单存储于所述嵌入式多媒体存储卡支持回放保护的物理分区中。
优选的,还包括:
验证单元,连接所述获取单元,用以验证所述应用程序的签名。
优选的,还包括:
更新单元,连接所述处理单元,当所述第二版本号大于所述最小第一版本号时,所述更新单元用以更新所述版本表单,将所述第二版本号更新为所述最小第一版本号,允许所述应用程序加载。
上述技术方案的有益效果:
本技术方案中,通过存储单元存储应用程序的版本表单,以保证在应用程序加载时依据版本表单检测待加载应用程序的安全性,实现在发现漏洞或安全隐患的情况下能够禁止应用程序加载的目的。
附图说明
图1为本发明所述的防回滚方法的方法流程图;
图2为本发明所述的防回滚的系统的一种实施例的模块图;
图3为本发明所述的防回滚的系统的一种实施例的工作原理图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。
下面结合附图和具体实施例对本发明作进一步说明,但不作为本发明的限定。
如图1所示,一种防回滚方法,提供一存储单元,用以存储应用程序的第一版本号的版本表单(即:版本表格Version Table,简称VT);该方法包括:
步骤S1.获取应用程序的第二版本号;
步骤S2.将第二版本号与存储单元中与应用程序关联的版本表单中的最小第一版本号的进行比较,当第二版本号小于最小第一版本号时,禁止应用程序加载。
需要说明的是,在本实施例中与存储于版本表单中的第一版本号对应的应用程序为可信应用程序。可信应用程序的头信息中携带可信应用程序的第二版本号(又称当前版本号Current Version Number,简称CVN),该头信息会 和可信应用程序的负载一起被签名。
进一步地,存储单元采用嵌入式多媒体存储卡(Embedded Multi Media Card,简称EMMC),版本表单存储于嵌入式多媒体存储卡支持回放保护的物理分区(Replay Protected Memory Block,简称RPMB)中。其中,RPMB是EMMC上支持回放保护的特殊分区。存储单元存储无安全隐患的应用程序的版本表单。
可信应用程序的版本表单保存在EMMC的RPMB分区中,通过RPMB技术从硬件层面确保了数据的完整性,外部无法对存储的版本表单进行篡改,保证版本表单中数据的真实可靠。
在本实施例中,通过存储单元存储应用程序的版本表单,以保证在应用程序加载时依据版本表单检测待加载应用程序的安全性,实现在发现漏洞或安全隐患的情况下能够禁止应用程序加载的目的。
在优选的实施例中,在执行步骤S1获取应用程序的第二版本号之前,还包括:
步骤A.验证应用程序的签名,若通过验证则获取应用程序的第二版本号;若验证失败则禁止应用程序加载。
进一步地,可采用非对称加密算法(RSA),和/或安全散列算法验证应用程序的签名。
作为一种较为优选的实施例,可采用非对称加密RSA-2048算法进行验证;还可采用安全散列算法(又称哈希函数SHA256)进行验证。从而保证验证的安全可靠,能够确保可信应用程序头信息及可信应用程序负载的完整性和真实性,保证包含在可信应用程序头信息中的第二版号不会被外部篡改。
在优选的实施例中,在执行步骤S1获取应用程序的第二版本号之前还 包括:
步骤B.触发应用程序在可信执行环境加载。
具体应用时可信应用程序可通过其他应用程序触发加载,由富执行环境(Rich Execute Environment,简称REE)转为TEE环境中加载。可信应用程序的版本检测过程在TEE环境中完成,以保证整个检查过程无法被外部劫持或更改。
其中,REE环境一般指Linux、Android等操作系统。
在优选的实施例中,当第二版本号大于最小第一版本号时,则更新版本表单,将第二版本号更新为最小第一版本号(Minimum Version Number,简称MVN),允许应用程序加载。
在本实施例中,版本号的比较是在TEE环境下进行的,从可信应用程序头信息获取可信应用程序的CVN;从EMMC的RPMB分区读取可信应用程序的版本表格,通过可信应用程序的通用唯一识别码(Universally Unique Identifier,简称UUID)检索到可信应用程序的MVN。对CVN和MVN进行比对,若CVN等于MVN,允许可信应用程序加载;若CVN大于MVN,安全系统会设置可信应用程序的MVN为CVN,并更新版本表单,版本检查通过,允许可信应用程序加载,可信应用程序正常运行。
当可信应用程序的CVN小于MVN时,版本检查失败,禁止可信应用程序加载,返回错误信息,可信应用程序加载失败。
如图2所示,本发明还提供了一种防回滚的系统,包括:
存储单元1,用以存储应用程序的第一版本号的版本表单;
获取单元3,用以获取应用程序的第二版本号;
处理单元2,连接获取单元3和存储单元1,用以将第二版本号与存储单 元1中与应用程序关联的版本表单中的最小第一版本号的进行比较,当第二版本号小于最小第一版本号时,禁止应用程序加载。
进一步地,存储单元1采用嵌入式多媒体存储卡,版本表单存储于嵌入式多媒体存储卡支持回放保护的物理分区中。
在实际应用时,防回滚的系统可以是移动终端。存储单元1采用嵌入式多媒体存储卡,版本表单存储于嵌入式多媒体存储卡支持回放保护的物理分区中。
在优选的实施例中,还包括:
验证单元5,连接获取单元3,用以验证应用程序的签名。
进一步地,可采用非对称加密算法,和/或安全散列算法验证应用程序的签名。
作为一种较为优选的实施例,可采用非对称加密RSA-2048算法进行验证;还可采用安全散列算法进行验证。从而保证验证的安全可靠,能够确保可信应用程序头信息及可信应用程序负载的完整性和真实性,保证包含在可信应用程序头信息中的第二版号不会被外部篡改。
在优选的实施例中,还包括:
更新单元4,连接处理单元2,当第二版本号大于最小第一版本号时,更新单元4用以更新版本表单,将第二版本号更新为最小第一版本号,允许应用程序加载。
在本实施例中,版本号的比较是在TEE环境下进行的,对CVN和MVN进行比对,若CVN等于MVN,允许可信应用程序加载;若CVN大于MVN,安全系统会设置可信应用程序的MVN为CVN,并更新版本表单,版本检查通过,允许可信应用程序加载,可信应用程序正常运行。
可信应用程序可被其他应用程序(如:客户端程序,Client Application,简称CA,CA运行在REE环境中)触发加载,作为举例而非限定,例如:可信应用程序TA为支付应用程序,客户端程序CA为电费查询应用程序。当用户需要通过嵌入有Secure OS安全系统的移动终端交纳电费时,利用电费查询程序查询需交纳的电费,可通过电费查询程序触发支付应用程序在TEE环境中加载,该安全系统将支付应用程序的当前版本号与存储单元中的版本号进行比对,只有当前程序版本号大于或等于存储单元中的版本号时,支付应用程序才会加载成功,实现支付功能,通过存储单元中的该应用版本号会同步更新;否则加载失败。这种机制可以保证过时的支付应用程序无法正常加载运行,防止支付应用程序的版本回滚。
在实际操作时,可信应用程序可运行于Secure OS安全系统中由富执行环境转为TEE环境中加载。可信应用程序的版本检测过程在TEE环境中完成,以保证整个检查过程无法被外部劫持或更改。参考图3所示,具体如下:
CA客户端程序:tee_demo
TA可信应用程序:8aaaf200-2450-11e4-abe2-0002a5d5c51b.ta
TA UUID:8aaaf200-2450-11e4-abe2-0002a5d5c51b
TA MVN:1
TA CVN:2
如图3所示,TA可信应用程序具体版本检查实施过程如下:
步骤1:CA客户端程序tee_demo从REE环境发起请求,触发TA可信应用程序加载,从REE环境加载8aaaf200-2450-11e4-abe2-0002a5d5c51b.ta到TEE环境中;
步骤2:TEE安全系统对8aaaf200-2450-11e4-abe2-0002a5d5c51b.ta进行数字签名校验,若此校验过程失败返回错误;校验成功则继续;
步骤3:TEE安全系统读取TA 8aaaf200-2450-11e4-abe2-0002a5d5c51b的TA头信息,获取TA的CVN值;TEE安全系统从RPMB读取TA的版本 表格VT,查询UUID为8aaaf200-2450-11e4-abe2-0002a5d5c51b的MVN值;
步骤4:TEE安全系统对比CVN和MVN的值,实验中,CVN=2,MVN=1,CVN>MVN,TEE安全系统更新VT中UUID为fd74bb1a32b4ae84457ff186b4efe7e7a661cd50的MVN为2,版本检查通过;
步骤5:TEE安全系统加载TA,TA开始正常运行。
本发明的防回滚方法的可信应用程序的头部信息中携带有当前版本号,存储单元中保存有可信程序通用唯一识别码及程序可运行最小版本号。可信应用程序加载的时候,安全系统会读取程序头信息中的版本号,并与存储单元中的版本号进行比对,只有当前程序版本号大于或等于存储单元中的版本号时,可信应用程序才会加载成功,同时,存储单元中的该应用版本号会同步更新;否则加载失败。这种机制可以保证过时的可信应用程序无法正常加载运行,防止可信应用程序的版本回滚。
以上所述仅为本发明较佳的实施例,并非因此限制本发明的实施方式及保护范围,对于本领域技术人员而言,应当能够意识到凡运用本发明说明书及图示内容所作出的等同替换和显而易见的变化所得到的方案,均应当包含在本发明的保护范围内。

Claims (10)

  1. 一种防回滚方法,其特征在于:提供一存储单元,用以存储应用程序的第一版本号的版本表单;所述防回滚方法包括下述步骤:
    获取所述应用程序的第二版本号;
    将所述第二版本号与所述存储单元中与所述应用程序关联的版本表单中的最小第一版本号的进行比较,当所述第二版本号小于所述最小第一版本号时,禁止所述应用程序加载。
  2. 根据权利要求1所述的防回滚方法,其特征在于:所述存储单元采用嵌入式多媒体存储卡,所述版本表单存储于所述嵌入式多媒体存储卡支持回放保护的物理分区中。
  3. 根据权利要求1所述的防回滚方法,其特征在于:获取所述应用程序的第二版本号之前,还包括:
    验证所述应用程序的签名,若通过验证则获取所述应用程序的第二版本号;若验证失败则禁止所述应用程序加载。
  4. 根据权利要求3所述的防回滚方法,其特征在于:采用非对称加密算法,和/或安全散列算法验证所述应用程序的签名。
  5. 根据权利要求1所述的防回滚方法,其特征在于:当所述第二版本号大于所述最小第一版本号时,则更新所述版本表单,将所述第二版本号更新为所述最小第一版本号,允许所述应用程序加载。
  6. 根据权利要求1所述的防回滚方法,其特征在于:获取所述应用程序的第二版本号之前还包括:
    触发所述应用程序在可信执行环境加载。
  7. 一种防回滚的系统,其特征在于,包括:
    存储单元,用以存储应用程序的第一版本号的版本表单;
    获取单元,用以获取所述应用程序的第二版本号;
    处理单元,连接所述获取单元和所述存储单元,用以将所述第二版本号与所述存储单元中与所述应用程序关联的版本表单中的最小第一版本号的进行比较,当所述第二版本号小于所述最小第一版本号时,禁止所述应用程序加载。
  8. 根据权利要求7所述的防回滚的系统,其特征在于:所述存储单元采用嵌入式多媒体存储卡,所述版本表单存储于所述嵌入式多媒体存储卡支持回放保护的物理分区中。
  9. 根据权利要求7所述的防回滚的系统,其特征在于:还包括:
    验证单元,连接所述获取单元,用以验证所述应用程序的签名。
  10. 根据权利要求7所述的防回滚的系统,其特征在于:还包括:
    更新单元,连接所述处理单元,当所述第二版本号大于所述最小第一版本号时,所述更新单元用以更新所述版本表单,将所述第二版本号更新为所述最小第一版本号,允许所述应用程序加载。
PCT/CN2018/113152 2018-06-06 2018-10-31 防回滚方法及系统 WO2019233022A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810576586.4 2018-06-06
CN201810576586.4A CN108985049A (zh) 2018-06-06 2018-06-06 防回滚方法及系统

Publications (1)

Publication Number Publication Date
WO2019233022A1 true WO2019233022A1 (zh) 2019-12-12

Family

ID=64540859

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113152 WO2019233022A1 (zh) 2018-06-06 2018-10-31 防回滚方法及系统

Country Status (2)

Country Link
CN (1) CN108985049A (zh)
WO (1) WO2019233022A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111417926A (zh) * 2018-12-13 2020-07-14 深圳市大疆软件科技有限公司 无人飞行器及其固件升级方法
WO2020133049A1 (zh) * 2018-12-27 2020-07-02 深圳配天智能技术研究院有限公司 数控加工方法、数控机床及计算机存储介质
CN111931213A (zh) * 2020-08-20 2020-11-13 Oppo(重庆)智能科技有限公司 文件处理方法、装置、终端及存储介质
CN113486360B (zh) * 2021-07-14 2022-11-11 上海瓶钵信息科技有限公司 基于risc-v的安全启动方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104798040A (zh) * 2012-11-07 2015-07-22 高通股份有限公司 用于在没有内部非易失性存储器的设备中提供防回滚保护的方法
CN104956374A (zh) * 2013-03-01 2015-09-30 意法爱立信有限公司 用于软件防回滚恢复的方法
US20170010881A1 (en) * 2015-07-07 2017-01-12 Canon Kabushiki Kaisha Information processing apparatus and control method therefor
CN106406939A (zh) * 2016-09-05 2017-02-15 惠州Tcl移动通信有限公司 一种基于emmc芯片的移动终端防回滚方法及系统
CN107797827A (zh) * 2016-08-30 2018-03-13 华邦电子股份有限公司 安全储存系统以及用于安全储存的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104798040A (zh) * 2012-11-07 2015-07-22 高通股份有限公司 用于在没有内部非易失性存储器的设备中提供防回滚保护的方法
CN104956374A (zh) * 2013-03-01 2015-09-30 意法爱立信有限公司 用于软件防回滚恢复的方法
US20170010881A1 (en) * 2015-07-07 2017-01-12 Canon Kabushiki Kaisha Information processing apparatus and control method therefor
CN107797827A (zh) * 2016-08-30 2018-03-13 华邦电子股份有限公司 安全储存系统以及用于安全储存的方法
CN106406939A (zh) * 2016-09-05 2017-02-15 惠州Tcl移动通信有限公司 一种基于emmc芯片的移动终端防回滚方法及系统

Also Published As

Publication number Publication date
CN108985049A (zh) 2018-12-11

Similar Documents

Publication Publication Date Title
US10417427B2 (en) Method for authenticating firmware volume and system therefor
EP2681689B1 (en) Protecting operating system configuration values
US10754955B2 (en) Authenticating a boot path update
WO2019233022A1 (zh) 防回滚方法及系统
US9110679B1 (en) Pre-boot management of drivers and programs
JP4971466B2 (ja) コンピューティング・デバイスの安全なブート
US9720782B2 (en) Authenticating a backup image with bifurcated storage
US9378372B2 (en) Secure download and security function execution method and apparatus
US20160203313A1 (en) Method and apparatus for modifying a computer program in a trusted manner
TW202016789A (zh) 基於區塊鏈的交易處理方法及裝置、電子設備
US8898797B2 (en) Secure option ROM firmware updates
US20130031631A1 (en) Detection of unauthorized device access or modifications
EP2727040B1 (en) A secure hosted execution architecture
US20160087801A1 (en) Cryptographically enforcing strict separation of environments
US20140149730A1 (en) Systems and methods for enforcing secure boot credential isolation among multiple operating systems
EP1872231A2 (en) Secure boot
US10803176B2 (en) Bios security
US20220382874A1 (en) Secure computation environment
WO2023065823A1 (zh) 一种软件开发工具包修复方法、终端、服务器及设备
US11909882B2 (en) Systems and methods to cryptographically verify an identity of an information handling system
US11514165B2 (en) Systems and methods for secure certificate use policies
CN110363011B (zh) 用于验证基于uefi的bios的安全性的方法和设备
US11080403B1 (en) Securely constructing a trusted virtual environment
WO2015131607A1 (zh) 可信环境创建方法和装置及基站异常恢复方法和装置
US20230359741A1 (en) Trusted boot method and apparatus, electronic device, and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18921811

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.03.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18921811

Country of ref document: EP

Kind code of ref document: A1