Secure software update installation procedure
The method secures software updates for IoT devices by authenticating and managing resource access during updates, ensuring consistent and secure system functionality.
Patent Information
- Application Number
- FR2023005373
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-06
AI Technical Summary
Devices connected to networks, such as IoT devices, lack a secure environment for software updates, allowing unauthorized updates and risking system inconsistency and privilege escalation during installation.
A method involving the reception of a software update module with a header containing first information and an indication value, comparing this with reference information, verifying authenticity and integrity, and installing the update only if the resources match authorized sets, with encrypted data decryption and resource management.
Ensures secure and consistent system updates by controlling resource access and preventing unauthorized updates, maintaining device functionality and security.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: Secure software update installation method Technical field
[0001] The present description relates generally to methods for installing application program updates on devices connected to networks such as, for example, devices connected to the Internet of Things. Prior art
[0002] Devices connected to a network, such as for example electronic devices connected to the Internet of Things, are configured to receive update software modules. The update software modules allow for example the updating of application programs contained in a memory of the device.
[0003] However, when receiving these update software modules and when installing them, the electronic devices are not in a secure environment. Indeed, the electronic devices are then, for example, in use and in the hands of their end user. In addition, the manufacturer of the devices does not, for example, have control over the programming of the update software modules.
[0004] It is generally desirable that, following installation of the update, the entire system defining the device remains consistent. It may also be desirable to ensure proper operation of the device after the update has been performed while ensuring that the update does not grant additional privileges to the updated application. Summary of the invention
[0005] One embodiment provides a method comprising: - receiving, by an electronic device, data comprising a software module for updating an application program of the device, the update software module comprising a first part comprising first update information and an indication value; - comparing, by a processor of the device, the first information with reference information stored in a memory of the device in association with the indication value; and - if the first information matches the reference information, the processor installs a second part of the application update module.
[0006] According to one embodiment, the indication value is an identifier of the application.
[0007] According to one embodiment, the indication value is a value identifying a category of application program.
[0008] According to one embodiment, the above method further comprises, before comparing the first information with the reference information, a verification of the authenticity and / or integrity of the update software module.
[0009] According to one embodiment, the first information is unencrypted data.
[0010] According to one embodiment, the second part of the update software module comprises encrypted data, the method further comprising, before installation, the decryption, by a cryptographic circuit of the device, of said encrypted data.
[0011] According to one embodiment, the first information indicates a set of device resources used during execution of the updated application.
[0012] According to one embodiment, the resources are peripheral circuits of the electronic device and / or buses of the electronic device and / or software codes stored in a non-volatile memory of the electronic device.
[0013] According to one embodiment, the reference information associated with the indication value indicates a set of authorized resources for the indication value and the first information corresponds with the reference information if the resources of the set of resources belong to the set of authorized resources.
[0014] According to one embodiment, the above method further comprises, following the installation of the update software module, a phase of registering the update software module, the registration phase comprising: - transmitting to the processor an indication of a set of resources being required when executing the updated application; - the comparison, by the processor, of the set of required resources with the set of resources indicated in the first part of the software module; and - if the resource sets match, storing, in association with the application, the indication value.
[0015] According to one embodiment, the above method further comprises, during the execution of the application updated by the processor: - sending a request for the use of a resource of the electronic device; - checking, based on the indication value stored in association with the application, whether the use of the resource is authorized.
[0016] According to one embodiment, the above method further comprises, if the first and second information do not correspond, deleting the update software module.
[0017] According to one embodiment, the above method further comprises, following the installation of the update software module, and when the updated application is active, the deactivation of the resources not forming part of the set of resources authorized for the indication value.
[0018] According to one embodiment, the sets of authorized resources are stored, in association with the indication value, in a memory of a secure circuit.
[0019] One embodiment provides an electronic device comprising: - an interface configured to receive data comprising a software module for updating an application program stored in a memory of the device, the update software module comprising a first part comprising first information and an indication value; - a processor configured to compare the first information with reference information stored in a memory of the device in association with the indication value, the processor being further configured to, if the first information corresponds with the reference information, command the installation of the update software module. Brief description of the drawings
[0020] These characteristics and advantages, as well as others, will be explained in detail in the following description of particular embodiments given without limitation in relation to the attached figures among which:
[0021] [Fig.l] is a block diagram illustrating an example of an electronic device according to an embodiment of the present disclosure;
[0022] [Fig.2] illustrates the structure of a header of an update software module, according to an embodiment of the present description;
[0023] [Fig.3] is a flowchart illustrating steps of a method of installing an update software module, according to an embodiment of the present description;
[0024] [Fig.4] is a block diagram illustrating the installation of an update software module according to an embodiment of the present disclosure; and
[0025] [Fig.5] is a flowchart illustrating steps of a method for recording an update software module, according to an embodiment of the present description. Description of the embodiments
[0026] The same elements have been designated by the same references in the different figures. In particular, the structural and / or functional elements common to the different embodiments may have the same references and may have identical structural, dimensional and material properties.
[0027] For the sake of clarity, only the steps and elements useful for understanding the described embodiments have been shown and are detailed. In particular, the methods for verifying the authenticity and / or integrity of received software modules are not described in detail and are known to those skilled in the art.
[0028] Unless otherwise specified, when referring to two elements connected to each other, this means directly connected without intermediate elements other than conductors, and when referring to two elements connected (in English "coupled") to each other, this means that these two elements can be connected or be connected by means of one or more other elements.
[0029] In the following description, when reference is made to absolute position qualifiers, such as the terms "front", "back", "top", "bottom", "left", "right", etc., or relative position qualifiers, such as the terms "above", "below", "upper", "lower", etc., or to orientation qualifiers, such as the terms "horizontal", "vertical", etc., reference is made unless otherwise specified to the orientation of the figures.
[0030] Unless otherwise specified, the expressions "about", "approximately", "substantially", and "of the order of" mean to within 10%, preferably to within 5%.
[0031] [Fig.l] is a block diagram illustrating an example of an electronic device 100 according to an embodiment of the present disclosure. In particular, the electronic device 100 comprises a circuit 102.
[0032] By way of example, the device 100 is a smartphone, a connected object such as, for example, a connected watch, an element of a home automation system, etc. In general, the device 100 is a device connected to a network, such as, for example, the Internet of Things. In particular, the circuit 102 comprises, for example, an interface 103 (INTERFACE). The interface 103 is, for example, configured to receive, via the network to which the device 100 is connected, data streams.
[0033] The circuit 102 comprises for example a processor 104 (CPU). The circuit 102 further comprises a non-volatile memory 106 (NV MEM) and / or a volatile memory 108 (RAM). For example, the non-volatile memory 106 is a Flash type memory. For example, the volatile memory 108 is a random access memory (in English “Random Access Memory”). The memories 106 and 108 are for example connected to the processor 104 via a bus 110. For example, the non-volatile memory 106 comprises memory locations in which application programs are stored. When executed, the application programs, for example, call upon resources of the circuit 102, such as, for example, peripheral circuits (not illustrated), such as, for example, an I2C (Inter-Integrated Circuit) type bus, an interface, for example, of the UART (Universal Asynchronous Receiver-Transmitter) type. For example, the device 100 comprises a circuit implementing a camera, a circuit implementing a geolocation system or GPS (from the English "Global Positioning System") etc. and certain application programs call upon the camera and / or the GPS and / or other types of peripheral circuits. When executed, the application programs for example also call upon software codes for example stored in the non-volatile memory 106.
[0034] The circuit 102 further comprises, for example, a cryptographic circuit 112 (CRYPTO) connected to the bus 110. By way of example, the cryptographic circuit 112 is configured to encrypt and / or decrypt data, received for example via the bus 110, according to a symmetric encryption algorithm or according to an asymmetric encryption algorithm.
[0035] According to one embodiment, the interface 103 is configured to receive update software modules, for example firmware modules, transmitted via the network to which the device 100 is connected. For example, the transmission of a software module is carried out wirelessly, for example by radio frequency (RF) signal. For example, an update software module allows the updating of one of the application codes stored in the non-volatile memory 106. However, in most cases, the programming of the update software modules transmitted to the device 100 is not carried out by the same entity as that which programmed the application codes and / or which designed the circuit 102.
[0036] For example, the update software modules take the form of a binary logical object (BLOB). In particular, the update software modules comprise a header in which several pieces of information are indicated. The update software modules further comprise the update code. For example, the update code is an encrypted code and the cryptographic circuit 112 is configured to decrypt it.
[0037] For example, the information contained in the header is not encrypted. In another example, the information contained in the header is encrypted and the cryptographic circuit 112 is configured to decrypt it.
[0038] [Fig.2] illustrates the structure of a header 200 (HEADER) of an update software module, according to an embodiment of the present description.
[0039] For example, the header 200 includes information 202 (CRYPTO SETTINGS), 204 (AUTH.TAG), 206 (INTEGRITY TAG) and 208 (FW INFORMATION). The information 202 is for example information relating to encryption parameters of the update code. The information 204 includes for example an authentication value. For example, the authentication value is generated during the programming of the update software module. update. For example, the authentication value is a digital signature, for example associated with the application code concerned by the update. The information 206 includes for example an integrity value. For example, the integrity value is generated during the programming of the update software module. For example, the integrity value is a hash value. For example, the hash value is obtained by applying a SHA-256 algorithm to the update code and to the binary logical object defining the update module. A signature associated with the hash value, as well as an asymmetric key, are added after the hash value. When the update module is received, the integrity of the module is verified by calculating a hash value from the code and the received binary logical object and by comparing it with the hash value included in the information 206.The module is for example authenticated following a signature check based on a public key. The public key is, for example, previously stored in a non-volatile memory of the device 100. For example, the public key is stored in the device 100 during the manufacture of the latter. For example, the public key is associated with a private key, having served in the calculation of the signature of the hash value. The information 208 includes for example information such as the application program concerned by the update and / or the version of the update. For example, upon receipt of the update module, the version is compared with the version of the software already installed on the device 100. For example, if the version of the update module is a version earlier than that of the installed software, the software is not updated in order, for example, to avoid introducing security flaws.For example, an indication of the version is also included in the hash value.
[0040] According to one embodiment, the header 200 further comprises information 210 (RESOURCES INFORMATION). The information 210 comprises, for example, an indication of one or more resources of the electronic device 100 which will be used during the execution of the application once updated. By way of example, the resources comprise peripheral circuits such as, for example, an interface, for example of the UART type, ports, for example of the GPIO (General Purpose Input / Output) type, buses, for example of the I2C type, or other types of peripheral circuits, such as cryptographic circuits, a camera, etc. The resources further comprise, for example, software codes, for example stored in the non-volatile memory 106.
[0041] According to one embodiment, the information 210 further comprises an indication value. For example, the indication value is an identification value of the application program concerned by the update. In another example, the indication value identifies a category, for example associated with one or more programs. applications. In another example, the indication value is included in information 208.
[0042] According to one embodiment, the circuit 102 further comprises a table, or a list, of data, for example stored in the non-volatile memory 106. The table, or the list, of data comprises, in association with indication values, an indication of a set of resources authorized for this indication value. For example, each application program is identified by an indication value, and the table, or the list, of data comprises, in association with each application program, and therefore with each indication value, a set of values, each value identifying for example one, or more, resources of the device. In another example, the application programs are grouped into categories, each category being associated with an indication value.In this example, the table, or list, of data, includes for each category, and therefore in association with each indication value, a set of values, each value identifying for example one or more resources of the device. For each indication value, the set of associated resources represents resources of the device 100 for which access is authorized for the application programs identified, or categorized by the indication value.
[0043] According to one embodiment, upon receipt of an update software module, the circuit 102, in particular the processor 104, is configured to extract the indication value from the header 200. The circuit 102 is further configured to compare the one or more resources indicated in the information 210 with the resources of the set of resources forming part of the table, or of the list, of data in association with the indication value.
[0044] For example, information 202, 204, 206, 208 and 210 of header 200 are not encrypted. In another example, one or more of information 202 to 210 are encrypted.
[0045] In the case where an update software module comprises a plurality of software sub-modules, the information 210 comprises for example a global resource indication, that is to say for the entire software module. The information 210 further comprises for example resource indications for each of the software sub-modules. The resources indicated, for each of the software sub-modules, belong to the set of global resources. Similarly, if a software sub-module comprises a lower level of other software sub-modules, the information 210 also comprises resource indications for each of these other lower-level software sub-modules. In addition, each resource indicated for each lower-level software sub-module then belongs to the set of resources indicated for the software sub-module.
[0046] [Fig. 3] is a flowchart illustrating steps of a method for installing an update software module, according to an embodiment of the present description. This method is implemented, for example, by the processor 104.
[0047] In a step 300, the electronic device 100 receives, for example via the interface 103, an update software module for an application program of the device 100. The update software module comprises a header having the structure of the header 200 as its structure. The update software module further comprises a second part comprising, for example, a code for updating the application program concerned. For example, the update code is encrypted. For example, the update software module is then temporarily stored in a volatile memory of the circuit 102.
[0048] Following step 300, the method continues in a step 301 (OK?). For example, step 301 comprises a verification, by the processor 104, of the authenticity and / or integrity of the update software module. For example, a verification of the authenticity of the software module is carried out on the basis of an authenticity value included in the information 204. For example, a verification of the integrity of the software module is carried out on the basis of an integrity value included in the information 206. The methods for verifying the authenticity and / or integrity of the software module are known to those skilled in the art.
[0049] If the check(s) performed in step 301 fail (branch N), the method ends in a step 302 (INSTALLATION REJECTED). Step 302 includes, for example, the deletion of the update software module from the volatile memory in which it was temporarily stored.
[0050] If the verification(s) carried out in step 301 are successful (branch Y at the output of block 301), the method continues in a step 303 (POLICIES COMPARISON OK?).
[0051] When performing step 303, the processor 104 extracts for example the indication value from the header and compares the resources indicated in the information 210 with the set of resources stored in the table, or list, of data in association with the indication value.
[0052] If at least one resource indicated by the information 210 is not included in the set of resources stored in the table, or list, of data in association with the indication value (branch N), the method ends in an implementation of step 302. The application program is then not updated.
[0053] In the case where the update software module comprises a plurality of software sub-modules, step 303 is for example carried out, in addition, sub-software module by sub-module.
[0054] If all the resources indicated by the information 210 are included in the set of resources stored in the table, or list, of data in association with the indication value (branch Y at the output of block 303), the method ends in a step 304 (INSTALLATION).
[0055] When the update code is encrypted, step 304 comprises the decryption, by the cryptographic circuit 112, of the code. Step 304 further comprises the execution, by the processor 104, of the update code, leading to the updating of the application program.
[0056] [Fig.4] is a block diagram illustrating the installation of a software module of update according to an embodiment of the present description. In particular, [Fig.4] illustrates an example of a device 400 configured to implement the method described in relation to [Fig.3].
[0057] The device 400 comprises, for example, a download circuit 402 (BLOB DOWNLOADER) configured to receive update software modules. For example, the download circuit 402 is similar to the interface 103.
[0058] The update software module is for example downloaded, by the download circuit 402, from a server. The software module then comprises a header, for example the structure of the header 200 described in relation to [Fig. 2]. In particular, the header of the software module comprises an indication value associated with information such as for example indications of resources of the device 400. By way of example, the header further comprises indications of the application program concerned by the update as well as for example an indication of the version of the program. The header further comprises for example an authenticity value and / or an integrity value of the module.
[0059] The device 400 further comprises a memory 404 (STORAGE SLOT) configured to temporarily store the update software module following its download by the circuit 402.
[0060] The device 400 further comprises a secure installation circuit 406 (SECURE INSTALLER). For example, the installation circuit 406 is a circuit similar to the processor 104. The installation circuit 406 is for example configured to carry out the authenticity and / or integrity checks, described in relation to step 301, of the update software module stored in the memory 404. For example, the authenticity and / or integrity checks are carried out on the basis of the authenticity and / or integrity values. For example, the authenticity and / or integrity checks are further carried out on the basis of encryption keys 408 for example stored in an internal memory of the installation circuit 406.
[0061] The device 400 further comprises a secure circuit 410 (SECURE CIRCUIT) comprising a list, or a table, of data 412 (POLICIES) as described in relation to Figures 2 and 3. The installation circuit 406 is further configured to perform the comparison step described in relation to step 303. In other words, the installation circuit 406 is further configured to extract the indication value from the header and to compare for example the resources indicated in the header with the resources indicated in the list, or table 412, given in association with the indication value.
[0062] The list, or table, of data therefore includes, for each application program of the device, or for each category of program, an indication of resources which can be used during the execution of the program. The programming of the list, or table, of data is for example carried out during the design of the circuit 102 and the devices 100 and 400. In other words, the content of the list or table is decided before the reception of the update software modules. The person skilled in the art will therefore know how to choose, for each program, or each category of programs, the resources of the device which he agrees to leave accessible by the program, or the category of programs.
[0063] By way of example, the secure circuit 410 comprises a memory 413 (MEM) configured to store other elements such as, for example, OBK keys (from the English “Option Byte Keys”).
[0064] The device 400 further comprises a non-volatile memory 414. For example, the non-volatile memory 414 is similar to the memory 106. The non-volatile memory 414 comprises, for example, a memory location 416 (SLOT A) and a memory location 418 (SLOT B). When the comparison described in relation to step 303 is successful, the installation circuit 406 is configured to install the update software module in one of the locations 416 or 418. For example, the location 418 is configured to store the application program concerned by the update and the update software module is then installed in the location 418. For example, before the installation of the update software module, the installation circuit is configured to control the decryption, for example by a cryptographic circuit such as the circuit 112, of the encrypted part of the software module.
[0065] [Fig.5] is a flowchart illustrating steps of a method for recording an update software module, according to an embodiment of the present description.
[0066] Once installed, i.e. following the completion of step 304, a step 500 (RESOURCES DECLARATION) takes place for example. Step 500 comprises a declaration, by the installed software module, of one or more resources required during its execution. The declaration is for example carried out by the processor 104 under the control of the installed software module. For example, the installed software module transmits an indication of one or more required resources to the secure circuit 410.
[0067] In a step 501 (COMPARISON WITH METADTA OK?), the required resources are compared, for example by the secure circuit 410, with the resources indicated in the header of the update software module still stored in the memory 404. For example, the update software module is kept in the memory 404 following its installation in a location of the memory 414.
[0068] When at least one of the declared required resources is not part of the resources indicated in the header of the update software module (branch N), the method ends in a step 502 (DELETION). In step 502, the update software module and its installation are deleted from the memories 404 and 414.
[0069] When in step 501, if it is determined that all the required resources are part of the resources indicated in the header (branch Y at the output of the block), the method continues in a step 503 (REGISTRATION). Step 503 consists for example of the registration of the software module, by the secure circuit 401. More precisely, the registration of the software module comprises for example, the storage in the secure circuit 410 of an identifier of the application program associated with a set of resources, the set of resources being for example the required resources.
[0070] Carrying out steps 500 to 503 then guarantees the exclusive use of the resources declared as being required.
[0071] For example, when the software module comprises several software sub-modules, steps 500 to 503 are also carried out sub-software module by sub-module.
[0072] In a step 504 (LOADING) subsequent to step 503, the updated application program installed in location 416 or 418 is loaded, for example, into a volatile memory such as for example memory 108 and is executed by a generic processor such as for example processor 104.
[0073] The secure circuit 410 is then, for example, configured to, in a step 505 (DEACTIVATION OF NON-LISTED RESOURCES), command the deactivation of all the resources not belonging to the list of resources required for the loaded application program. Following the deactivation of the resources, the updated application program is, for example, executed by a generic processor such as, for example, the processor 104.
[0074] For example, during execution of the updated program, each time access to a resource is requested, the secure circuit 410 is configured to verify that the resource belongs to the required resources stored in association with the program identifier. If the resource does not belong to all of the required resources stored in association with the program identifier, then the secure circuit 410 is for example configured to prohibit access to the resource.
[0075] An advantage of the described embodiments is that they allow controlling access to the resources of a device for updates coming from outside.
[0076] Various embodiments and variations have been described. Those skilled in the art will understand that certain features of these various embodiments and variations could be combined, and other variations will occur to those skilled in the art. In particular, the encryption and decryption methods used may vary. Similarly, the list or table implementation of the indications 412 may vary.
[0077] Finally, the practical implementation of the embodiments and variants described is within the reach of those skilled in the art from the functional indications given above, in particular, with regard to the implementation of the secure circuit 410.
Claims
Claims
1. A method comprising: - receiving, by an electronic device (100, 400), data comprising a software module for updating an application program of the device, the update software module comprising a first part (200) comprising first update information (210) and an indication value; - comparing, by a processor (104, 410) of the device, the first information with reference information (412) stored in a memory of the device in association with the indication value; and - if the first information matches the reference information, installing, by the processor, a second part of the application update module.
2. The method of claim 1, wherein the indication value is an identifier of the application.
3. The method of claim 1, wherein the indication value is a value identifying a category of application programs.
4. Method according to any one of claims 1 to 3, further comprising, before comparing the first information (210) with the reference information (412), a verification of the authenticity and / or integrity of the update software module.
5. A method according to any one of claims 1 to 4, wherein the first information (210) is unencrypted data.
6. A method according to any one of claims 1 to 5, wherein the second part of the update software module comprises encrypted data, the method further comprising, before installation, decrypting, by a cryptographic circuit (112) of the device, said encrypted data.
7. A method according to any one of claims 1 to 6, wherein the first information (210) indicates a set of device resources used when running the updated application.
8. The method of claim 7, wherein the resources are peripheral circuits of the electronic device and / or buses of the electronic device and / or software codes stored in a non-volatile memory of the electronic device.
9. A method according to claim 7 or 8, wherein the information of reference (412) associated with the indication value indicates a set of authorized resources for the indication value and wherein the first information (210) matches with the reference information if the resources in the set of resources belong to the set of authorized resources.
10. A method according to any one of claims 7 to 9, further comprising, following installation of the update software module, a phase of registering the update software module, the registering phase comprising: - transmitting, to the processor (104, 410), an indication of a set of resources being required when executing the updated application; - comparing, by the processor, the set of required resources with the set of resources indicated in the first part (210) of the software module; and - if the sets of resources match, storing, in association with the application, the indication value.
11. The method of claim 10, further comprising, upon execution of the application updated by the processor (104, 410): - sending a request for use of a resource of the electronic device; - checking, based on the indication value stored in association with the application, whether use of the resource is authorized.
12. The method of claim 10 or 11, further comprising, if the first and second information do not match, deleting the update software module.
13. A method according to any one of claims 7 to 12, further comprising, following installation of the update software module, and when the updated application is active, disabling resources not forming part of the set of resources authorized for the indication value.
14. A method according to any one of claims 7 to 13, wherein the sets of authorized resources are stored, in association with the indication value, in a memory of a secure circuit (410).
15. Electronic device comprising: - an interface (103) configured to receive data comprising a software module for updating an application program stored in a memory (106, 414) of the device, the software module for updating day comprising a first part (200) comprising first information (210) and an indication value; - a processor (104, 410) configured to compare the first information with reference information (412) stored in a memory of the device in association with the indication value, the processor being further configured to, if the first information matches the reference information, control the installation of the update software module.
Citation Information
Patent Citations
Secure firmware deployment
US10860305B1
Platform security
WO2011042892A1
