Storage Devices
By using digital signature verification in collaboration between a secure CPU and a general CPU in the storage device, the reliability of the firmware is ensured, and high-reliability recovery firmware is stored in the non-volatile memory, which solves the problem that the storage device cannot repair itself after the firmware is tampered with. problems, achieving high-reliability firmware recovery and usability improvement.
Patent Information
- Application Number
- CN202010062994.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-09
- Filing Date
- 2020-01-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-01-20
AI Technical Summary
Existing storage devices cannot repair themselves after the firmware is tampered with, and need to be entrusted to the manufacturer for repair. The recovery firmware is also easily tampered with, making it impossible for users to repair the storage device.
A storage device is designed, including a non-volatile memory and a controller. It uses the cooperation of the security CPU and the general CPU to ensure the reliability of the firmware through digital signature verification, and saves high-reliability recovery data in the non-volatile memory. firmware to achieve high-level recovery of firmware.
This design reduces the cost of handing the storage device to the manufacturer for repair, improves the availability of the storage device, ensures high-reliability recovery of firmware, and avoids unrepairable problems caused by tampering with recovery firmware.
Smart Images

Figure CN112347518B_ABST
Abstract
Description
[0001] This application enjoys the priority right based on Japanese Patent Application No. 2019-147505 (filing date: August 9, 2019). This application includes all the contents of the basic application by reference. Technical Field
[0002] Embodiments of the present invention relate to a storage device. Background Art
[0003] In recent years, various storage devices such as HDD (Hard Disk Drive) and SSD (Solid State Drive) have gained widespread popularity. Such storage devices perform processing such as writing and reading data according to steps represented by programs such as firmware. Therefore, when the firmware is tampered with, the storage device will perform improper (illegal) actions. In addition, the same is true when the data that affects the operation of the storage device is tampered with. Therefore, storage devices equipped with security functions for verifying the reliability of programs and data including firmware have emerged. The security function of verifying the reliability of firmware at startup is called the Secure Boot function, etc.
[0004] In a storage device equipped with a secure boot function, if the firmware is tampered with, the secure boot function inhibits the storage device from being started. Therefore, in order to repair the storage device, the storage device needs to be handed over to the manufacturer or the like to request repair.
[0005] If the storage device itself is equipped with a function to repair the storage device by rewriting the tampered firmware into recovery firmware for repairing the firmware, it is not necessary to hand over the storage device to the manufacturer for repair. However, if the recovery firmware is also tampered with, it becomes impossible to repair the storage device in the hands of the user. Summary of the invention
[0006] Embodiments of the present invention provide a storage device capable of restoring firmware at a high level while ensuring reliability.
[0007] The storage device of the embodiment includes a non-volatile memory and a controller. The controller controls writing data to the non-volatile memory and reading data from the non-volatile memory based on a command from a host. The controller includes at least one processor. The non-volatile memory stores normal operation firmware and recovery firmware, the normal operation firmware is used for the at least one processor to control writing and reading data based on the command, and the recovery firmware is used to repair the normal operation firmware. The recovery firmware is stored in the non-volatile memory in a state where higher reliability than the normal operation firmware is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 This is a diagram showing a configuration example of the storage device according to the first embodiment.
[0009] Figure 2 This is a diagram showing functional blocks related to firmware recovery of the storage device according to the first embodiment.
[0010] Figure 3 This is a flowchart showing the operation procedure related to firmware recovery of the storage device according to the first embodiment.
[0011] Figure 4 This is a diagram showing functional blocks related to firmware recovery of the storage device according to the second embodiment.
[0012] Figure 5 This is a diagram showing a configuration example of a storage device according to the third embodiment.
[0013] Figure 6 This is a diagram showing functional blocks related to firmware recovery of the storage device according to the third embodiment.
[0014] Figure 7 This is a diagram showing functional blocks related to firmware recovery of a storage device according to a fourth embodiment.
[0015] Description of symbols
[0016] 1 storage device; 2 host; 10 controller; 11 security CPU; 12-1, 12-2 general CPU; 20 volatile memory; 30 non-volatile memory; 30A high security area; 30B normal area; 31, 32-1, 32-2 normal operation firmware; 33, 34-1, 34-2 recovery firmware; 35 important data; 36 important data for recovery; 40 read-only memory; 111 detection unit; 112 recovery determination unit; 113 recovery execution unit; 114 security assurance data DETAILED DESCRIPTION
[0017] Hereinafter, embodiments will be described with reference to the drawings.
[0018] (First embodiment)
[0019] First, the first embodiment will be described.
[0020] Figure 1 It is a diagram showing a configuration example of the storage device 1 according to the present embodiment.
[0021] The storage device 1 receives commands from a host 2 connected via an interface such as PCIe (registered trademark), executes processing corresponding to the commands, and sends the processing results to the host 2. The commands received by the storage device 1 include write commands for writing data, read commands for reading data, etc. In addition, the storage device 1 can receive various control commands such as commands for setting partitions on a storage area.
[0022] The storage device 1 includes a controller 10 configured as, for example, a SoC (System On a Chip), a volatile memory 20 such as a DRAM, and a nonvolatile memory 30 such as a flash memory.
[0023] The controller 10 uses the volatile memory 20 as a temporary data storage area and performs a write process of writing data to the nonvolatile memory 30 and a read process of reading data from the nonvolatile memory 30. That is, the controller 10 controls the nonvolatile memory 30 based on the command from the host 2. The controller 10 has a plurality of CPUs (11, 12-1, 12-2) including a security CPU 11.
[0024] The access unit for accessing the information stored in the memory built into the security CPU 11 is limited, and the reliability of the information can be guaranteed. Therefore, the security CPU 11 is a CPU with higher security strength than a general CPU. Here, it is assumed that the controller 10 has two general CPUs (CPU-A12-1, CPU-B12-2) in addition to the security CPU 11. Ensuring reliability includes ensuring the publisher of the program by verifying the digital signature. In addition, ensuring reliability includes ensuring integrity. That is, verifying reliability includes verifying integrity. In the controller 10, CPU-A12-1 and CPU-B12-2 cooperate to perform a write process of writing data to the non-volatile memory 30 and / or a read process of reading data from the non-volatile memory 30. Alternatively, CPU-A12-1 and CPU-B12-2 respectively perform a write process of writing data to the non-volatile memory 30 and / or a read process of reading data from the non-volatile memory 30. Hereinafter, CPU-A 12 - 1 and CPU-B 12 - 2 , which are general CPUs, may be collectively referred to as CPU 12 .
[0025] The safety CPU 11, CPU-A 12-1, and CPU-B 12-2 execute the processing according to the steps indicated by the firmware (the safety CPU FW 31 for normal operation, CPU-AFW 32-1 for normal operation, and CPU-BFW 32-2 for normal operation described later) stored in the nonvolatile memory 30. Specifically, the safety CPU 11, CPU-A 12-1, and CPU-B 12-2 load the firmware from the nonvolatile memory 30 to the volatile memory 20 as appropriate, for example, in units of modules, and execute the firmware. The safety CPU 11 stores safety assurance data for verifying the reliability of each firmware. The safety CPU 11 verifies the reliability of each firmware using the safety assurance data, for example, when the storage device 1 is started. That is, the storage device 1 has a secure boot function. The safety assurance data stored in the safety CPU 11 can only be accessed by the safety CPU 11. In order to tamper with the safety assurance data, the safety CPU 11 must be caused to operate improperly, so it is necessary to tamper with the firmware of the safety CPU 11 first. However, tampering of the firmware of the security CPU 11 can be detected by, for example, verifying the reliability when the storage device 1 is started. Therefore, the security assurance data in the security CPU 11 can ensure its reliability, and can be treated as the root of reliability (Root of Trust). The security assurance data is not limited to specific information, and various information such as verification keys and MAC values can be applied.
[0026] The storage device 1 having the above-described configuration has a function of restoring tampered firmware. Figure 2This is a diagram showing functional blocks related to firmware restoration of the present storage device 1 .
[0027] The safety CPU 11 includes a detection unit 111, a recovery determination unit 112, and a recovery execution unit 113. These units are implemented by the safety CPU 11 executing a program whose reliability is guaranteed at a high level by being stored in a memory that is only accessible and readable by the safety CPU 11. Alternatively, the program itself may be stored in the safety CPU 11 as one of the safety guarantee data 114.
[0028] Furthermore, the nonvolatile memory 30 first stores a normal operation safety CPU FW31 as firmware for the safety CPU 11, a normal operation CPU-A FW32-1 as firmware for the CPU-A 12-1, and a normal operation CPU-B FW32-2 as firmware for the CPU-B 12-2. Furthermore, the nonvolatile memory 30 secondly stores a recovery safety CPU FW33 as firmware for recovering the normal operation safety CPU FW31, a recovery CPU-A FW34-1 as firmware for recovering the normal operation CPU-A FW32-1, and a recovery CPU-B FW34-2 as firmware for recovering the normal operation CPU-B FW32-2.
[0029] Of the former normal operation safety CPU FW31, normal operation CPU-AFW32-1, and normal operation CPU-B FW32-2 and the latter recovery safety CPU FW33, recovery CPU-A FW34-1, and recovery CPU-B FW34-2, at least the latter recovery safety CPU FW33, recovery CPU-A FW34-1, and recovery CPU-B FW34-2 are stored in an encrypted state in the nonvolatile memory 30. That is, the present storage device 1 has at least a function related to decryption among the encryption functions of encrypting a program and / or data and decrypting the encrypted program and / or data. In addition, the latter recovery security CPU FW33, recovery CPU-AFW34-1, and recovery CPU-B FW34-2 are encrypted using an algorithm with higher encryption strength or an encryption key with a larger key length than the former normal operation security CPU FW31, normal operation CPU-A FW32-1, and normal operation CPU-B FW32-2. That is, they are stored in the non-volatile memory 30 in a state of ensuring high reliability. If the present storage device 1 also has a function of decompressing compressed programs and / or data, the normal operation firmware (31, 32-1, 32-2) and the recovery firmware (33, 34-1, 34-2) can also be stored in the non-volatile memory 30 in a compressed state.
[0030] The detection unit 111 is a module for detecting tampering of the normal operation firmware during the operation of the storage device 1, and detects abnormal operation of the storage device 1, more specifically, abnormal operation of the security CPU 11, CPU-A 12-1, or CPU-B 12-2. In addition, tampering of the normal operation firmware during the stop of the storage device 1 is detected by the aforementioned secure boot function when the storage device 1 is started. The method of detecting abnormal operation is not limited to a specific method, and various known methods can be applied.
[0031] When abnormal operation of the storage device 1 is detected, the recovery determination unit 112 determines whether the storage device 1 can be recovered by recovering the normal operation firmware. This determination may be, for example, to investigate whether the detected abnormal operation is an abnormal operation caused by a hardware failure, and if it is not an abnormal operation caused by a hardware failure, determine that it can be recovered by recovering the normal operation firmware. In addition, it may be determined as follows: using the safety guarantee data stored in the safety CPU 11, the reliability of the normal operation safety CPU FW31, the normal operation CPU-A FW32-1, and the normal operation CPU-B FW32-2 is verified, and when tampering is detected, determine that it can be recovered by recovering the normal operation firmware.
[0032] The recovery execution unit 113 performs recovery of the normal operation firmware when it is determined that the storage device 1 in which the abnormal operation is detected can be recovered by recovery of the normal operation firmware. For example, when the abnormal operation of the CPU-A12-1 is detected by the detection unit 111 and the recovery determination unit 112 determines that the CPU-A12-1 can be recovered by recovery of the normal operation CPU-AFW32-1, the recovery execution unit 113 rewrites the normal operation CPU-AFW32-1 into the recovery CPU-A FW34-1 and performs a process of restarting the storage device 1. In addition, when it is determined that the storage device 1 cannot be recovered by recovery of the normal operation firmware, the recovery determination unit 112 notifies the host 2 of an error. When notifying the host 2 of an error, the recovery determination unit 112 may also stop the storage device 1.
[0033] Furthermore, when the secure boot function described above detects tampering of the normal operation CPU-A FW 32-1 when the storage device 1 is booted, the recovery execution unit 113 rewrites the normal operation CPU-A FW 32-1 to the recovery CPU-A FW 34-1 and executes a process to restart the storage device 1.
[0034] In addition, the recovery firmware (33, 34-1, 34-2) may be the same firmware as the normal operation firmware (31, 32-1, 32-2) as a so-called backup, or may be firmware having the minimum necessary function for repairing the normal operation firmware, such as obtaining the regular normal operation firmware from the host 2. Repairing the firmware means, for example, rewriting the tampered firmware into the regular firmware to restore it to the state before the tampering.
[0035] For example, if the tampered normal operation CPU-AFW32-1 is to be repaired by the recovery CPU-A FW34-1, but the recovery CPU-A FW34-1 is also tampered, the storage device 1 can be inhibited from being started by the secure boot function that operates when the storage device 1 is restarted. In other words, the storage device 1 cannot be restored, and the storage device must be handed over to the manufacturer or the like for restoration.
[0036] Therefore, in the present storage device 1, the recovery firmware (33, 34-1, 34-2) is stored in the nonvolatile memory 30 in a state where the reliability is higher than that of the normal operation firmware (31, 32-1, 32-2). In addition, when the normal operation firmware is rewritten to the recovery firmware, the present storage device 1 verifies the reliability of the recovery firmware using the security assurance data 114 stored in the security CPU 11.
[0037] As for storing the recovery firmware in the non-volatile memory 30 while ensuring a higher reliability than the normal operation firmware, as mentioned above, it is achieved by encrypting it using an algorithm with high encryption strength or an encryption key with a large key length. For example, in the case of encryption using a public key encryption method, the public key (encryption key) used for decoding is stored in the security CPU 11 as security data 114. The module responsible for the encryption function of the storage device 1 accepts information representing the encryption key stored in the security CPU 11 as security data 114 as a parameter, and uses the encryption key represented by the information to perform decoding of the indicated program or data. In addition, in the case where the module responsible for the encryption function supports multiple algorithms, the specification of the algorithm is also accepted through parameters.
[0038] For example, when rewriting the normal operation firmware 32-1 to the recovery firmware 34-1, the recovery execution unit 113 first executes a read operation to read the recovery firmware 34-1 from the nonvolatile memory 30. Figure 2 :a1). As described above, the recovery firmware 34-1 is encrypted and stored in the non-volatile memory 30. The recovery execution unit 113 instructs the module responsible for the encryption function to decode the recovery firmware 34-1 read from the non-volatile memory 30. The recovery execution unit 113 stores the decoded recovery firmware 34-1 in the volatile memory 20 ( Figure 2 :a2) In addition, the restoration execution unit 113 may be configured to instruct the module responsible for the encryption function to decrypt the encrypted restoration firmware 34-1 after storing it in the volatile memory 20. Figure 2 The recovery firmware on the volatile memory 20 shown in FIG. 1 is the decoded recovery firmware.
[0039] Next, the restoration execution unit 113 verifies the authenticity of the restoration firmware 34 - 1 stored in the volatile memory 20 using the security assurance data 114 stored in the security CPU 11 ( Figure 2 : a3). If the verification is successful, the recovery execution unit 113 updates the normal operation firmware 32-1 on the nonvolatile memory 30 to the recovery firmware 34-1 ( Figure 2 : a4), restart the storage device 1. When the verification fails, the recovery execution unit 113 notifies the host 2 of the error. When notifying the host 2 of the error, the recovery execution unit 113 may also stop the storage device 1.
[0040] Furthermore, the recovery execution unit 113 may be configured to verify the reliability of the security assurance data 114 stored in the security CPU 11 with respect to the recovery firmware in the encrypted state, and instruct the module responsible for the encryption function to decrypt the firmware if the verification succeeds.
[0041] By storing the recovery firmware in the nonvolatile memory 30 while ensuring higher reliability than the normal operation firmware, the storage device 1 can reduce the cost of repair work such as handing over the storage device to a manufacturer or the like to request firmware repair, thereby improving availability.
[0042] When the recovery firmware has the minimum necessary functions for repairing the normal operation firmware, such as obtaining the regular normal operation firmware from the host 2, the storage device 1 restarted by the recovery execution unit 113 operates according to the following steps, for example.
[0043] First, the storage device 1 verifies the reliability of the recovery firmware using the secure boot function. The recovery firmware is stored in the nonvolatile memory 30 with high reliability, so if the verification succeeds, the storage device 1 starts operating according to the steps indicated by the recovery firmware.
[0044] The storage device 1 obtains the normal operation firmware from the host 2. For example, if the interface connecting the storage device 1 and the host 2 supports access to the memory on the host 2 side from the storage device 1 side, the normal operation firmware can be obtained by reading the normal operation firmware from the memory on the host 2 side. Alternatively, the normal operation firmware can be obtained by sending a command to the host 2 requesting the transmission of the normal operation firmware. Alternatively, the storage device 1 can simply send a message to the host 2 indicating that the firmware needs to be updated, or the normal operation firmware can be updated later under the guidance of the host 2.
[0045] The storage device 1 rewrites the firmware on the nonvolatile memory 30 that has been rewritten with the recovery firmware with the normal operation firmware obtained from the host 2. After the rewriting, the storage device 1 is restarted.
[0046] Furthermore, when the normal operation firmware is obtained from the host 2, information for verifying the authenticity of the normal operation firmware and an encryption key for decrypting the encryption may also be obtained and stored again in the security CPU 11 as security assurance data.
[0047] Figure 3 This is a flowchart showing the operation procedure related to firmware recovery of the storage device 1 according to the present embodiment.
[0048] The detection unit 111 detects an abnormal operation of the storage device 1 (safety CPU 11, CPU-A12-1 or CPU-B12-2) (S11). When an abnormal operation is detected (S11: Yes), the recovery determination unit 112 determines the cause of the abnormal operation (S12). For example, it determines whether the abnormal operation is an operation caused by a hardware failure. Based on the determination result of the cause of the abnormal operation, the recovery determination unit 112 determines whether it can be repaired by updating the firmware (safety CPU FW31 for normal operation, CPU-A12-1 or CPU-B12-2) (S13).
[0049] When it is determined that the system can be repaired by updating the firmware (S13: Yes), the recovery execution unit 113 reads the recovery firmware (the recovery safety CPU FW33, the recovery CPU-AFW34-1, or the recovery CPU-B FW34-2) from the non-volatile memory 30 and stores it in the volatile memory 20 (S14). The recovery execution unit 113 verifies the reliability of the recovery firmware using the security assurance data stored in the safety CPU 11 (S15).
[0050] When the verification is successful (S16: YES), the recovery execution unit 113 updates the normal operation firmware on the nonvolatile memory 30 to the recovery firmware (S17), and restarts the storage device 1 (S18).
[0051] On the other hand, when the recovery determination unit 112 determines that the storage device 1 in which the abnormal operation is detected cannot be recovered by firmware recovery (S13: No), or when the verification of the reliability of the recovery firmware by the recovery execution unit 113 fails (S16: No), the error is notified to the host 2 from the recovery determination unit 112 or the recovery execution unit 113 (S19).
[0052] As described above, the present storage device 1 that stores the restoration firmware in the nonvolatile memory 30 in a state where the reliability is higher than that of the normal operation firmware can restore the firmware with a high level of reliability.
[0053] (Second embodiment)
[0054] Next, a second embodiment will be described.
[0055] Figure 4 1 is a diagram showing functional blocks related to firmware recovery of the storage device 1 of the present embodiment. The storage device 1 of the present embodiment also has a controller 10, a volatile memory 20, and a non-volatile memory 30, similarly to the first embodiment. Here, the same reference numerals are used for the same components as those of the first embodiment, and their repeated descriptions are omitted.
[0056] In the storage device 1 of the present embodiment, a partition whose access rights are limited to the security CPU 11 is set on the nonvolatile memory 30, and the recovery firmware (33, 34-1, 34-2) is stored in the partition. Here, the access rights are limited to the security CPU 11, which means that only the security CPU 11 can access or can only access under the instruction from the security CPU 11. For example, being able to access only under the instruction from the security CPU 11 means that CPU-A 12-1 and CPU-B 12-2 can only access under the control of the security CPU 11.
[0057] The partition whose access rights are limited to the security CPU 11 is set, for example, during the manufacturing process of the storage device 1 , and the partition is set as a partition that cannot be the target of external commands including control commands.
[0058] Here, the area in which the access rights are limited to the partition of the secure CPU 11 is referred to as the high security area 30A, and the area outside the partition on the nonvolatile memory 30 is referred to as the normal area 30B. For example, the normal operation CPU-A FW 32-1 for the CPU-A 12-1 is stored in the normal area 30B accessible to the CPU-A 12-1. That is, the normal operation firmware (31, 32-1, 32-2) is stored in the normal area 30B.
[0059] As described above, the storage device 1 of this embodiment stores the recovery firmware in the high security area 30A which is an area in the partition with limited access rights to the secure CPU 11, thereby storing the recovery firmware in the nonvolatile memory 30 with higher reliability than the normal operation firmware.
[0060] In addition, in the storage device 1 of this embodiment, it can also be set that: when the recovery firmware is stored in the high security area 30A, it is further encrypted using an algorithm with higher encryption strength or an encryption key with a larger key length than when the normal operation firmware is stored in the normal area 30B.
[0061] In the storage device 1 of the present embodiment, for example, when rewriting the normal operation firmware 32-1 to the recovery firmware 34-1, the recovery execution unit 113 reads the recovery firmware 34-1 from the high security area 30A of the nonvolatile memory 30. Figure 4 : b1). After that, the restoration execution unit 113 executes the process in the same steps as the first embodiment. That is, the restoration execution unit 113 stores the read restoration firmware 34-1 in the volatile memory 20 ( Figure 4 : b2), using the security assurance data 114 stored in the security CPU 11, the reliability of the recovery firmware 34-1 stored in the volatile memory 20 is verified ( Figure 4 :b3).
[0062] If the verification is successful, the restore execution unit 113 updates the normal operation firmware 32-1 on the nonvolatile memory 30 to the restore firmware 34-1 ( Figure 4 : b4), restart the storage device 1. When the verification fails, the recovery execution unit 113 notifies the host 2 of the error. When notifying the host 2 of the error, the recovery execution unit 113 may also stop the storage device 1.
[0063] As described above, in the storage device 1 of this embodiment, by storing the recovery firmware in the high security area 30A which is an area within the partition whose access rights are limited to the secure CPU 11 and storing it in the non-volatile memory 30 while ensuring higher reliability than the normal operation firmware, the cost of repair work such as handing over the storage device to a manufacturer etc. to entrust the firmware to be repaired can be reduced in the same way as in the first embodiment, thereby improving availability.
[0064] That is, the storage device 1 can also restore the firmware with a high level of reliability.
[0065] (Third embodiment)
[0066] Next, a third embodiment will be described.
[0067] Figure 5 It is a diagram showing a configuration example of the storage device 1 according to the present embodiment.
[0068] The storage device 1 of this embodiment further includes a read-only memory 40 as a mask ROM or the like, as compared to the first and second embodiments. In addition, the access right to the read-only memory 40 is limited to the security CPU 11. Here, the access right is limited to the security CPU 11, which means that only the security CPU 11 can access or can only access under the instruction from the security CPU 11. Can only access under the instruction from the security CPU 11 means, for example, that CPU-A 12-1 and CPU-B 12-2 can only access under the control of the security CPU 11. In addition, the same reference numerals are used for the same components as those in the first and second embodiments, and their repeated descriptions are omitted.
[0069] Figure 6 It is a diagram showing functional blocks related to firmware recovery of the storage device 1 according to the present embodiment.
[0070] In the storage device 1 of the present embodiment, the recovery firmware (33, 34-1, 34-2) is stored in the read-only memory 40 whose access permission is limited to the security CPU 11. That is, the storage device 1 of the present embodiment uses the read-only memory 40 whose access permission is limited to the security CPU 11 as the storage location for the recovery firmware, thereby realizing the storage of the recovery firmware in a state where the reliability is higher than that of the normal operation firmware.
[0071] In addition, when the recovery firmware is stored in a large-capacity nonvolatile memory 30 as in the first embodiment and the second embodiment, as described in the description of the first embodiment, the recovery firmware may be a firmware identical to the normal operation firmware as a so-called backup, or may be a firmware having the minimum necessary function for repairing the normal operation firmware, such as obtaining the regular normal operation firmware from the host 2. On the other hand, when a new read-only memory 40 is provided for the purpose of storing the recovery firmware while ensuring high reliability, it is required to minimize the capacity of the read-only memory 40 in order to suppress costs. For example, it is preferably within about 500K bytes. Considering this point, in the storage device 1 of the present embodiment, the recovery firmware is a firmware having the minimum necessary function for repairing the normal operation firmware, such as obtaining the regular normal operation firmware from the host 2. That is, the capacity of the read-only memory 40 may also be a capacity significantly smaller than the capacity required for storing the normal operation firmware.
[0072] When rewriting the normal operation firmware 32-1 to the recovery firmware 34-1, for example, the recovery execution unit 113 in the storage device 1 of the present embodiment reads the recovery firmware 34-1 from the read-only memory 40 whose access authority is limited to the security CPU 11. Figure 6 :c1). Afterwards, the restoration execution unit 113 executes the process in the same steps as the first embodiment and the second embodiment. That is, the restoration execution unit 113 saves the read restoration firmware 34-1 to the volatile memory 20 ( Figure 6 : c2), using the security assurance data 114 stored in the security CPU 11, the reliability of the recovery firmware 34-1 stored in the volatile memory 20 is verified ( Figure 6 :c3).
[0073] If the verification is successful, the restore execution unit 113 updates the normal operation firmware 32-1 on the nonvolatile memory 30 to the restore firmware 34-1 ( Figure 6 : c4), restart the storage device 1. When the verification fails, the recovery execution unit 113 notifies the host 2 of the error. When notifying the host 2 of the error, the recovery execution unit 113 may also stop the storage device 1.
[0074] In the storage device 1 of the present embodiment, as described above, it is assumed that the recovery firmware is firmware having the minimum necessary function for repairing the normal operation firmware, such as obtaining the legitimate normal operation firmware from the host 2. Therefore, the storage device 1 that has successfully verified the authenticity of the recovery firmware 34-1 and has been rewritten with the recovery firmware 34-1 and restarted, operates, for example, according to the following steps as described in the description of the first embodiment.
[0075] First, the storage device 1 verifies the authenticity of the recovery firmware using the secure boot function. If the recovery firmware read from the read-only memory 40 whose access rights are limited to the security CPU 11 is successfully verified, the storage device 1 starts operating along the steps indicated by the recovery firmware.
[0076] The storage device 1 obtains normal operation firmware from the host 2, and rewrites the firmware on the nonvolatile memory 30 that has been rewritten with the recovery firmware with the normal operation firmware obtained from the host 2. After the rewriting, the storage device 1 restarts.
[0077] As described above, in the storage device 1 of the present embodiment, in which the read-only memory 40 whose access rights are limited to the security CPU 11 is used as the storage location for the recovery firmware and the recovery firmware is stored in a state where higher reliability than the normal operation firmware is ensured, the cost of repair work such as handing over the storage device to a manufacturer or the like to entrust the firmware to be repaired can be reduced in the same manner as in the first and second embodiments, thereby improving availability.
[0078] That is, the storage device 1 can also restore the firmware with a high level of reliability.
[0079] In the above, an example is described in which a read-only memory 40 such as a mask ROM or the like having access rights limited to the security CPU 11 is used as a storage element for storing the recovery firmware. That is, an example is described in which the recovery firmware is stored in a state where a higher reliability than the normal operation firmware stored in the non-volatile memory 30 is ensured by using a non-rewritable storage element as a storage location. As a modified example, an example is described in which a writable storage element such as a NOR flash memory is used instead of the read-only memory 40.
[0080] In this variant, as a storage element for storing the recovery firmware, a NOR-type flash memory is assumed to be external to the controller 10. In addition, the access rights of the NOR-type flash memory are limited to the security CPU 11. Moreover, in this variant in which the writable NOR-type flash memory is used as the storage location for the recovery firmware, the verification data used to verify the reliability of the recovery firmware stored in the NOR-type flash memory is stored, for example, in a fuse element (eFuse), which stores data by irreversibly changing the element characteristics electrically. The eFuse can be set either inside the controller 10 or outside the controller 10. The verification data is, for example, a hash value.
[0081] When the recovery execution unit 113 reads the recovery firmware from the NOR flash memory and rewrites the normal operation firmware on the non-volatile memory 30 with the read recovery firmware, the reliability of the read recovery firmware is verified using the verification data recorded in the eFuse. If the verification is successful, the recovery execution unit 113 rewrites the normal operation firmware on the non-volatile memory 30 with the recovery firmware. In this way, in this variant, it is also possible to save the recovery firmware in a state where the reliability is higher than that of the normal operation firmware.
[0082] In this variant, the following effect is achieved: compared with the case where the dedicated read memory 40 is a mask ROM or the like, the recovery firmware stored in the NOR flash memory can be changed when the storage device 1 is manufactured. In addition, the verification data for verifying the reliability of the recovery firmware is recorded by the eFuse, so it is possible to cope with the replacement of the NOR flash memory itself. Alternatively, it can also be set that: in the case where the recovery firmware is stored in the dedicated read memory 40 such as a mask ROM, the verification data for verifying the reliability of the recovery firmware is also recorded in the eFuse.
[0083] In addition, in the present embodiment, it is assumed that the recovery firmware has the minimum necessary function for repairing the normal operation firmware, such as obtaining the regular normal operation firmware from the host 2, and the normal operation firmware on the non-volatile memory 30 is rewritten with the recovery firmware, and the storage device 1 is restarted. It is also possible that, in the case where the recovery firmware is firmware having the minimum necessary function for repairing the normal operation firmware, such as obtaining the regular normal operation firmware from the host 2, instead of rewriting the normal operation firmware on the non-volatile memory 30 with the recovery firmware, the normal operation firmware on the non-volatile memory 30 is obtained from the host 2 using the recovery firmware that has successfully verified the reliability of the security guarantee data 114 after being stored in the volatile memory 20, and the normal operation firmware on the tampered non-volatile memory 30 is rewritten with the regular normal operation firmware obtained from the host 2. In this case, the storage device 1 only needs to be restarted once.
[0084] (Fourth embodiment)
[0085] Next, a fourth embodiment will be described.
[0086] Figure 7 1 is a diagram showing functional blocks related to firmware recovery of the storage device 1 of the present embodiment. The storage device 1 of the present embodiment also has a controller 10, a volatile memory 20, and a non-volatile memory 30, similarly to the first to third embodiments. Here, the same reference numerals are used for the same components as those of the first to third embodiments, and their repeated descriptions are omitted.
[0087] The storage device 1 of this embodiment, like the first embodiment, sets a partition whose access rights are limited to the secure CPU 11 on the nonvolatile memory 30 and stores the recovery firmware in the partition. That is, in the storage device 1 of this embodiment, the high security area 30A exists on the nonvolatile memory 30 .
[0088] In addition, in the storage device 1 of the present embodiment, it is assumed that the normal operation firmware processes important data such as encryption keys. The important data is stored in the normal area 30B of the non-volatile memory 30 in the same manner as the normal operation firmware. In addition, information for verifying its reliability is stored in the security CPU 11 as security guarantee data 114. Furthermore, in the storage device 1 of the present embodiment, the important data can be updated at a specific timing by instructions based on commands from the host 2 and / or internal processing of the storage device 1.
[0089] In this case, if the latest important data is lost when restoring the normal operation firmware, the restarted storage device 1 will not be able to operate normally. Therefore, the storage device 1 of this embodiment further stores the important recovery data 36 for repairing the important data 35 in the high security area 30A on the nonvolatile memory 30.
[0090] The restore execution unit 113 in the storage device 1 of the present embodiment reads the updated important data 35 (eg, the updated important data 35) from the normal area 30B of the nonvolatile memory 30 when the important data 35 is updated at a specific timing. Figure 7 :d11). In addition, the storage of the important data 36 for restoration in the high security area 30A by the restoration execution unit 113 may be performed at a timing different from the updating of the important data 35. That is, the reading of the important data 35 from the normal area 30B represented by the reference numeral d11 is not limited to the updating of the important data 35 at a specific timing.
[0091] The recovery execution unit 113 verifies the reliability of the important data 35 read from the normal area 30B using the security assurance data 114 stored in the security CPU 11 ( Figure 7 : d12). If the verification is successful, the recovery execution unit 113 writes the read important data 35 into the high security area 30A ( Figure 7 : d13). When the verification fails, the recovery execution unit 113 notifies the host 2 of the error. When notifying the host 2 of the error, the recovery execution unit 113 may stop the storage device 1.
[0092] When restoring the normal operation firmware, the restore execution unit 113 reads the important restore data 36 ( Figure 7 : d21). In addition, the procedure of restoring the normal operation firmware itself is as described in the first embodiment, and therefore, the description thereof is omitted here.
[0093] The recovery execution unit 113 verifies the reliability of the read recovery important data 36 using the security assurance data 114 stored in the security CPU 11. Figure 7 : d22). Then, when the verification is successful, the restore execution unit 113 rewrites the important data 35 stored in the normal area 30B of the nonvolatile memory 30 with the important data 36 for restoration.
[0094] In the storage device 1 of this embodiment, important data processed by the normal operation firmware is updated at a specific timing, and when the normal operation firmware is restored, the latest important data is repaired. Therefore, it can continue to be used from the state before the abnormal operation is detected, which can improve availability.
[0095] In addition, in the present embodiment, an example is described in which a partition whose access rights are limited to the security CPU 11 is set on the non-volatile memory 30, and important data processed by the recovery firmware and the normal operation firmware are stored in the partition. It can also be set as follows: in the form in which the recovery firmware is stored in a writable storage element such as a NOR flash memory, which is described as a modified example in the third embodiment, and the verification data for verifying the reliability of the recovery firmware is recorded by an eFuse, a backup of the important data processed by the normal operation firmware is stored in the NOR flash memory. The verification data is recorded by a fuse corresponding only to the recovery firmware that is not updated. Even if the important data is stored only in the NOR flash memory whose access rights are limited to the security CPU 11, the reliability of the important data can be guaranteed at a high level.
[0096] In this case, a combination of storing unupdated recovery firmware whose verification data is recorded by fuse in a part of the NOR flash memory and storing updated important data in another area of the NOR flash memory can be realized at low cost.
[0097] Several embodiments of the present invention have been described above, but these embodiments are provided as examples and are not intended to limit the scope of the invention. These new embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the scope of the invention. These embodiments and their variations are included in the scope and purpose of the invention, and are included in the invention described in the claims and their equivalents.
Claims
1. A storage device comprising: non-volatile memory; and a controller that controls writing data to and reading data from the nonvolatile memory based on a command from a host, The controller includes at least one processor, The nonvolatile memory stores normal operation firmware and recovery firmware, wherein the normal operation firmware is used for the at least one processor to control writing and reading of data based on the command, and the recovery firmware is used to repair the normal operation firmware. The normal operation firmware and the recovery firmware are encrypted, and the recovery firmware is encrypted using an algorithm with higher encryption strength or an encryption key with a larger key length than that of the normal operation firmware and is stored in the nonvolatile memory.
2. The storage device according to claim 1, The at least one processor includes a first processor having a function of verifying the reliability of the normal operation firmware and the recovery firmware, A first area accessible only to the first processor is set in the nonvolatile memory. The recovery firmware is stored in the first area. The normal operation firmware is stored in a second area of the nonvolatile memory excluding the first area.
3. The storage device according to claim 2, When the normal operation firmware is repaired by the recovery firmware, data to be used by the normal operation firmware is stored in the first area.
4. The storage device according to claim 2, The recovery firmware is a program for causing the first processor to execute a process of obtaining the regular normal operation firmware from the host and a process of updating the normal operation firmware stored in the second area of the nonvolatile memory to the regular normal operation firmware obtained from the host.
5. A storage device comprising: non-volatile memory; and a controller that controls writing data to and reading data from the nonvolatile memory based on a command from a host, The controller includes a processor, The nonvolatile memory stores normal operation firmware and recovery firmware, wherein the normal operation firmware is used by the processor to control writing and reading of data based on the command, and the recovery firmware is used to repair the normal operation firmware. The controller includes a first processor having a function of verifying the reliability of the normal operation firmware and the recovery firmware and a second processor that executes the normal operation firmware, the first processor being able to access a first area of the non-volatile memory but the second processor being unable to access the first area, and the recovery firmware being stored in the first area, and the normal operation firmware being stored in a second area of the non-volatile memory that is different from the first area, The normal operation firmware and the recovery firmware are encrypted, and the recovery firmware is encrypted using an algorithm with higher encryption strength or an encryption key with a larger key length than that of the normal operation firmware and is stored in the nonvolatile memory.
6. The storage device according to claim 5, When the normal operation firmware is repaired by the recovery firmware, data to be used by the normal operation firmware is stored in the first area.
7. The storage device according to claim 5, The recovery firmware is a program for causing the first processor to execute a process of obtaining the regular normal operation firmware from the host and a process of updating the normal operation firmware stored in the second area of the nonvolatile memory to the regular normal operation firmware obtained from the host.
8. A storage device comprising: A first non-volatile memory; a second nonvolatile memory for storing data including a program in a state where higher reliability than that of the first nonvolatile memory is ensured; and a controller that controls writing data to the first nonvolatile memory and reading data from the first nonvolatile memory based on a command from a host, The controller includes a processor, Normal operation firmware for controlling the processor to write and read data based on the command is stored in the first nonvolatile memory. The recovery firmware for repairing the normal operation firmware is stored in the second nonvolatile memory. The controller includes a first processor having a function of verifying the reliability of the normal operation firmware and the recovery firmware and a second processor that executes the normal operation firmware, the first processor can access the second non-volatile memory but the second processor cannot access the second non-volatile memory, and the recovery firmware is stored in the second non-volatile memory, and the normal operation firmware is stored in the first non-volatile memory, The normal operation firmware and the recovery firmware are encrypted, and the recovery firmware is encrypted using an algorithm with higher encryption strength or an encryption key with a larger key length than that of the normal operation firmware and is stored in the second nonvolatile memory.
9. The storage device according to claim 8, When the normal operation firmware is repaired by the recovery firmware, data to be used by the normal operation firmware is stored in the first nonvolatile memory.
10. The storage device according to claim 8, The recovery firmware is a program for causing the first processor to execute a process of obtaining the regular normal operation firmware from the host and a process of updating the normal operation firmware stored in the second nonvolatile memory to the regular normal operation firmware obtained from the host.
Citation Information
Patent Citations
Mounting structure for bracket
JP2019147505A
Method for controlling electronic equipment and electronic equipment
CN103810430A
Processing system
CN104424441A
BIOS firmware dividing and updating method and system
CN104573529A
BIOS control system
JP1997330272A
