Processor system
The processor system with a master processor and secure verification mechanism minimizes resource consumption on non-verified processors by local check code calculation and secure storage, ensuring efficient processing and preventing unauthorized updates.
Patent Information
- Application Number
- JP2023064612
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2024-10-25
AI Technical Summary
In processor systems with multiple processors, verifying firmware written to one processor consumes calculation resources of other processors, potentially affecting original processing.
A processor system with a master processor that controls communication among processors, uses pseudo data writing and verification units to reduce resource consumption by calculating verification check codes locally, storing reference check codes securely, and rolling back unauthorized firmware updates.
Reduces calculation resource consumption on non-verified processors, allowing them to maintain original processing efficiency while preventing unauthorized firmware updates.
Smart Images

Figure 2024151397000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a processor system in which firmware is implemented in each processor. [Background technology]
[0002] In a processor system in which multiple processors cooperate to execute processing, a configuration in which firmware is implemented in each processor has been put to practical use. In this case, it is preferable that the processor system is configured so that the firmware of each processor can be updated. However, in a configuration in which the firmware of each processor can be updated, there is a risk that an attacker may write unauthorized firmware to one or more processors. For this reason, measures against the writing of unauthorized firmware have been proposed (for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2020-133958 A Summary of the Invention [Problem to be solved by the invention]
[0004] As described above, a method has been proposed for monitoring unauthorized firmware writing in a configuration in which firmware is implemented in each of multiple processors. However, firmware written in one of the multiple processors is basically verified by the other processors. This means that the computing resources of the other processors are consumed to verify the firmware, which can affect the original processing.
[0005] An object according to one aspect of the present invention is to reduce consumption of computing resources of processors other than the processor to be verified when verifying firmware in a processor system having a plurality of processors. [Means for solving the problem]
[0006] A processor system according to one embodiment of the present invention includes a plurality of processors and a master processor that controls communication between the plurality of processors, a pseudo data writing unit that writes pseudo data into an empty area of a firmware storage area of a first processor among the plurality of processors when writing firmware into the firmware storage area of the first processor or updating firmware stored in the firmware storage area, and a verifying unit that, when a verification check code is calculated by a predetermined calculation on the entire firmware storage area in the first processor, verifies the firmware written in the firmware storage area based on the verification check code. Effect of the Invention
[0007] According to the above-described aspect, in a processor system including a plurality of processors, consumption of computing resources of processors other than the processor to be verified is reduced during firmware verification. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram illustrating an example of a processor system according to an embodiment of the present invention. [Diagram 2] FIG. 1 is a diagram showing an example of a procedure for updating firmware (part 1). [Diagram 3] FIG. 2 is a diagram showing an example of a procedure for updating firmware (part 2). [Figure 4] FIG. 3 is a diagram showing an example of a procedure for updating firmware (part 3). [Diagram 5]FIG. 4 is a diagram showing an example of a procedure for updating firmware. [Figure 6] FIG. 1 is a diagram showing an example of a procedure for verifying firmware (part 1). [Figure 7] FIG. 2 is a diagram showing an example of a procedure for verifying firmware (part 2). [Figure 8] 10 is a flowchart illustrating an example of a process for updating firmware. [Figure 9] 11 is a flowchart illustrating an example of a process for verifying firmware. [Figure 10] FIG. 11 is a diagram showing a procedure for updating firmware in another embodiment. [Figure 11] FIG. 11 is a diagram showing a procedure for verifying firmware in another embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] FIG. 1 shows an example of a processor system according to an embodiment of the present invention. The processor system 100 according to the embodiment of the present invention includes multiple CPUs 1 (1a to 1n), a master CPU 2, and a shared storage 3. However, the processor system 100 may include other functions, circuits, or devices not shown in FIG. 1. The multiple CPUs 1a to 1n correspond to "multiple processors" that make up the processor system 100. The master CPU 2 corresponds to a "master processor" that controls communication between the multiple processors.
[0010] Each CPU 1 includes a processor element and a memory. The memory includes a firmware storage area for implementing firmware. That is, firmware can be implemented in the memory of each CPU 1. In this embodiment, firmware FWa to FWn are implemented in CPUs 1a to 1n, respectively. Then, each CPU 1 provides a corresponding function by executing the implemented firmware. Note that CPUs 1a to 1n may be provided in the same device or in different devices.
[0011] The master CPU2 controls communication among the CPUs 1a to 1n. Specifically, the master CPU2 controls communication among the CPUs 1a to 1n within the processor system 100. At this time, communication among the CPUs 1a to 1n is performed via the master CPU2. Note that, although the master CPU2 and each of the CPUs 1a to 1n are directly connected in the example shown in FIG. 1, the embodiment of the present invention is not limited to this configuration. For example, the master CPU2 and each of the CPUs 1a to 1n may be connected to a bus or a network. However, even in such a configuration, a packet transmitted from the CPU 1 is transferred to the destination by the master CPU2.
[0012] Moreover, the master CPU 2 controls communication between the CPUs 1a to 1n and a communication device provided outside the processor system 100. That is, the master CPU 2 includes an interface for connecting to the network 200.
[0013] Furthermore, the master CPU 2 controls the communications of the CPUs 1a to 1n in a single-session manner in which multiple communications sessions are not set up at the same time. That is, multiple communications sessions are not set up at the same time in the processor system 100. Therefore, for example, when communications are being performed between an external communications device and the CPU 1n, the master CPU 2 does not allow communications of other CPUs (i.e., CPUs 1a, 1b, etc.). Alternatively, when communications are being performed between the CPUs 1a and 1b, the master CPU 2 does not allow communications of other CPUs (i.e., CPU 1n, etc.).
[0014] In this embodiment, a "communication session" refers to a state in which signals can be transmitted between communication nodes. That is, "setting up a communication session between node X and node Y" means configuring a state in which signals can be transmitted between node X and node Y, and in this case, there is no need for negotiation or the like to be performed between nodes X and Y. For example, "setting up a communication session between CPU1a and CPU1n" means that the master CPU2 configures a state in which signals can be transmitted between CPU1a and CPU1n.
[0015] The common storage 3 includes an update data storage area 31 and individual data storage areas 32a to 32n for managing firmware FWa to FWn implemented in the CPUs 1a to 1n. Each of the individual data storage areas 32a to 32n stores a backup of the firmware implemented in the corresponding CPU 1 and data related to verification of the firmware. For example, the individual data storage area 32a stores a backup of the firmware FWa implemented in the CPU 1a and data related to verification of the firmware implemented in the CPU 1a. In this embodiment, each of the individual data storage areas 32a to 32n is configured so as not to be accessed by the corresponding CPU 1.
[0016] Thus, the processor system 100 includes the CPUs 1a to 1n and the master CPU 2, and the CPUs 1a to 1n execute the corresponding firmware FWa to FWn, respectively. At this time, the master CPU 2 controls the communications of the CPUs 1a to 1n.
[0017] <Firmware update> 2 to 5 show an example of a procedure for updating firmware installed in CPU 1. In this example, firmware (not shown) installed in CPU 1n is updated. Note that the procedure for writing firmware to CPU 1 for the first time is also substantially the same as the update procedure shown in FIGS. 2 to 5.
[0018] The CPU 1 (here, CPU 1n) includes a memory 11 and a check code calculation unit 12. The memory 11 includes a firmware storage area 11F. The firmware storage area 11F is an area for storing firmware FWn to be distributed to the CPU 1n. The size and memory address of the firmware storage area 11F are predetermined. The check code calculation unit 12, which will be described in detail later, calculates a check code for verifying whether or not the firmware stored in the firmware storage area 11F is genuine firmware.
[0019] 2 to 5, the check code calculation unit 12 is depicted as being independent of the firmware, but in reality, for example, the check code calculation unit 12 is implemented in one of a plurality of sections constituting the firmware. In this case, the firmware includes a function for verifying its own validity.
[0020] The master CPU 2 includes a random number generator 21, a pseudo data writing unit 22, and a verification unit 23. The master CPU 2 may include other functions not shown in Fig. 2. For example, the master CPU 2 includes a function of generating and managing communication sessions between the CPUs 1a to 1n.
[0021] The random number generator 21 generates random numbers of a predetermined length in response to a request from the pseudo data writing unit 22 or the verification unit 23. The pseudo data writing unit 22 writes pseudo data into a free area of the firmware storage area 11F when firmware is written to the firmware storage area 11F of the CPU1n. In this embodiment, the pseudo data is a random number generated by the random number generator 21. The verification unit 23 verifies the firmware written to the firmware storage area 11F of the CPU1n based on a check code calculated in the CPU1n.
[0022] As described above, the common storage 3 includes the update data saving area 31 and the individual data saving areas 32a to 32n. Note that the individual data saving areas for the CPUs 1 other than the CPU 1n are omitted in Figures 2 to 5.
[0023] When updating the firmware of CPU1n, as shown in Fig. 2, the firmware to be implemented in CPU1n (for example, firmware FWn shown in Fig. 1) is written to the update data storage area 31 of the common storage 3. The firmware FWn is created, for example, by an operator or a management manual of the processor system 100, and written to the update data storage area 31 of the common storage 3 via the master CPU 2. It is also assumed that the firmware FWn is made up of a plurality of sections. In this embodiment, the firmware FWn is made up of sections 1 to m.
[0024] Next, the master CPU2 reads out the firmware FWn from the update data save area 31 and writes it to the firmware storage area 11F of the CPU1n, as shown in Fig. 3. Here, it is assumed that the size of the firmware storage area 11F is larger than the size of the firmware FWn. Therefore, when the firmware FWn is written to the firmware storage area 11F, a free area remains in the firmware storage area 11F. Note that when the firmware FWn is composed of multiple sections, the multiple sections do not necessarily need to be stored contiguously, and as shown in Fig. 3, sections 1 to m may be stored discretely.
[0025] The master CPU2 generates pseudo data and writes it to the firmware storage area 11F so that no free space remains in the firmware storage area 11F. Here, it is assumed that the size of the firmware storage area 11F is known, and the master CPU2 can detect the size of firmware FWn. Therefore, the master CPU2 can calculate the size of the free space in the firmware storage area 11F when the firmware FWn is written to the firmware storage area 11F.
[0026] The pseudo data writing unit 22 obtains a random number having a data amount equivalent to the size of the free space in the firmware storage area 11F from the random number generator 21. The pseudo data writing unit 22 then writes the random number obtained from the random number generator 21 as pseudo data into the free space in the firmware storage area 11F. Note that in Fig. 3, the hatched area in the firmware storage area 11F represents the area where the pseudo data has been written.
[0027] As shown in FIG. 4, the master CPU 2 instructs the CPU 1n to calculate a check code used when verifying the firmware. At this time, the verification unit 23 prepares verification challenge data. The verification challenge data is realized by a random number generated by the random number generator 21. The length of the verification challenge data is determined according to a function for calculating a check code in the CPU 1n. That is, the verification unit 23 acquires the verification challenge data by making the random number generator 21 generate a random number of a predetermined length. Then, the verification unit 23 transmits a check code calculation instruction and the verification challenge data to the CPU 1n. The verification unit 23 also stores this verification challenge data in the individual data storage area 32n in the common storage 3. The CPU 1n cannot access the verification challenge data stored in the individual data storage area 32n. For example, the master CPU 2 does not permit the CPU 1n to access the individual data storage area 32n.
[0028] When the CPU1n receives a check code calculation instruction from the master CPU2, the check code calculation unit 12 generates a check code for the firmware FWn. In this embodiment, the check code is calculated using a message authentication code (MAC). Specifically, the check code is obtained by calculating a MAC value using a hash-based MAC (HMAC) function. The hash function used within the HMAC function is not particularly limited, and may be, for example, SHA-256. Also, the function is not limited to the HMAC function, and any function capable of calculating a keyed hash value may be used. However, it is preferable to use functions that are desirable from the viewpoint of security.
[0029] The check code calculation unit 12 calculates a MAC value for the verification challenge data and all data in the firmware storage area 11F. At this time, the verification challenge data is input to the HMAC function as key data, and the data stored in the firmware storage area 11F is input as a message. The check code calculation unit 12 then outputs the calculation result as a reference check code for the firmware FWn. In the following description, the reference check code calculated for the genuine firmware written by the master CPU2 to the CPU1n may be referred to as a "check code C1." The check code C1 is used as reference data or standard data when verifying the firmware written to the memory 11 of the CPU1n.
[0030] 5, the CPU1n transmits the check code C1 calculated by the check code calculation unit 12 to the master CPU2. The master CPU2 then stores the check code C1 received from the CPU1n in an individual data storage area 32n provided for the CPU1n. Furthermore, the master CPU2 stores the firmware FWn stored in the update data storage area 31 (i.e., the firmware FWn implemented in the CPU1n) in the individual data storage area 32n as backup data. After this, the master CPU2 may clear the update data storage area 31.
[0031] In this way, when regular firmware is written to the memory 11 of the CPU1n (or when the firmware of the CPU1n is updated in a regular procedure), a reference check code used in verifying the firmware is calculated and stored in the common storage 3. At this time, the verification challenge data used to calculate the reference check code is also stored in the common storage 3. After this, the CPU1n operates according to the implemented firmware.
[0032] <Verify firmware> As described above, the firmware installed in each CPU 1 (1a to 1n) may be updated as necessary. However, when the processor system 100 is connected to the network 200, there is a risk that a malicious attacker may illegally update the firmware of the CPUs 1a to 1n. For this reason, the processor system 100 has a function for verifying whether the firmware installed in the CPUs 1a to 1n is genuine firmware.
[0033] For example, when a certain CPU1 is accessed from outside the processor system 100, the processor system 100 estimates that the firmware of the CPU1 may have been illegally updated. Therefore, the processor system 100 may verify the firmware of the CPU1 when the certain CPU1 is accessed from outside the processor system 100. In this embodiment, access to the CPU1 from outside the processor system 100 always goes through the master CPU2. Therefore, the master CPU2 may start verifying the firmware of the CPU1 when any of the CPU1 is accessed from outside the processor system 100. Alternatively, the processor system 100 may periodically verify the firmware of each CPU1. In the following description, the CPU1 for which firmware verification is executed may be called the "verification target CPU".
[0034] 6 and 7 show an example of a procedure for verifying firmware installed in the CPU 1. In this embodiment, it is assumed that the firmware of the CPU 1n is updated according to the procedure shown in Figs. 2 to 5, and the corresponding check code C1 and verification challenge data are stored in the individual data storage area 32n in the common storage 3. Then, the processor system 100 verifies the firmware of the CPU 1n. That is, the CPU 1n is the CPU to be verified.
[0035] When verifying the firmware of CPU1n, the master CPU2 instructs CPU1n to calculate a check code in Fig. 6. At this time, the master CPU2 acquires verification challenge data from the common storage 3. As described with reference to Fig. 4, this verification challenge data is a random number of a predetermined length that was used to calculate a check code when the firmware of CPU1n was properly updated. Then, the master CPU2 transmits the verification challenge data acquired from the common storage 3 to the CPU to be verified (i.e., CPU1n) as a parameter to be used to calculate the check code, together with the instruction to calculate the check code.
[0036] When the CPU1n receives the instruction to calculate the check code, it calculates the check code of the firmware stored in the memory 11 of the CPU1n. The calculation of the check code is substantially the same as the procedure when updating the firmware. That is, in the CPU1n, the check code calculation unit 12 calculates a MAC value by providing the verification challenge data and all data in the firmware storage area 11F to the HMAC function. Then, the check code calculation unit 12 outputs the calculation result as a verification check code for the firmware FWn. After that, the CPU1n transmits the verification check code representing the calculation result of the HMAC function to the master CPU2, as shown in FIG. 7. In the following description, the verification check code calculated to verify the firmware of the CPU1n may be referred to as a "check code C2".
[0037] When the master CPU2 receives the verification check code from the CPU to be verified, it verifies whether the firmware of the CPU to be verified has been illegally updated. Specifically, the verification unit 23 obtains the check code C1 from the common storage 3. The check code C1 is a MAC value calculated for all data in the firmware storage area 11F when the firmware of the CPU1n is legitimately updated. Next, the verification unit 23 compares the check code C1 obtained from the common storage 3 with the check code C2 newly received from the CPU1n. That is, the reference check code and the verification check code are compared. Then, if the check code C1 and the check code C2 match each other, the verification unit 23 determines that the legitimate firmware is stored in the memory 11 of the CPU1n.
[0038] On the other hand, when the check code C1 and the check code C2 do not match each other, the verification unit 23 determines that the firmware of the CPU1n may have been illegally updated. In this case, the master CPU2 copies the firmware FWn stored in the individual data storage area 32n in the common storage 3 to the update data storage area 31, and executes a firmware update process for the CPU1n. As a result, the firmware of the CPU1n is re-updated (i.e., rolled back) to the regular firmware. When re-updating the firmware of the CPU to be verified, it is preferable to execute the procedures shown in FIGS. 2 to 5. In this case, new verification challenge data and a new reference check code are stored in the common storage 3.
[0039] As described above, in the processor system 100 according to the embodiment of the present invention, the verification of the firmware of the CPU to be verified is realized by a process of calculating a verification check code and a process of comparing the calculated verification check code with a reference check code. Here, the process of calculating the check code places a large load on the computational resources, although this depends on the function used. For example, the amount of computation required for the process of calculating a MAC value using an HMAC function is large. However, the process of calculating the check code is executed by the CPU to be verified itself. Therefore, when verifying the firmware, the amount of computational resources used by CPUs other than the CPU to be verified is small. Therefore, CPUs other than the CPU to be verified can execute their original processes without delay.
[0040] Although there is a risk that the functions that the CPU under test may be delayed due to possible unauthorized updates, this risk can be limited to the CPU under test. This makes it possible to incorporate countermeasures into the system design. Examples of countermeasures include the following: (1) Another CPU takes over the processing of the CPU being verified. (2) A system design (constraint) is adopted in which any CPU is temporarily halted or in degraded operation for a certain period of time immediately after communicating with the outside world, and functions are assigned to each CPU to prevent or mitigate delays in the equipment (processing timing control and scheduling). (3) Functions that do not permit delays will be excluded from firmware updates, and a system design will be adopted in which communication is only possible during maintenance.
[0041] In addition, in the embodiment of the present invention, in the firmware storage area 11F of each CPU 1, pseudo data is written to an area where firmware is not stored. That is, there is no unused area in the firmware storage area 11F. For this reason, it is difficult to illegally rewrite firmware without being detected.
[0042] For example, a known value (such as 0xff or 0x00) is usually written in an unused area of memory. In this case, if an attacker writes unauthorized information in a part of the unused area and sets a command that provides the above-mentioned known value to the HMAC function when verifying the firmware, the attacker can make the firmware perform unauthorized operations. However, in the embodiment of the present invention, pseudo data is written in the free area in the firmware storage area 11F, and there is no unused area. In order to unauthorizedly rewrite the firmware without being detected, the attacker needs to reproduce the pseudo data, making the above-mentioned attack difficult.
[0043] Even if pseudo data is written in the free area of the firmware storage area 11F, if an attacker obtains all the data in the firmware storage area 11F, the attacker can illegally rewrite the firmware without being detected. However, in the embodiment of the present invention, a check code is calculated using the verification challenge data. This verification challenge data is stored in an area that cannot be accessed by the CPU to be verified. Therefore, an attacker cannot easily obtain the verification challenge data and cannot reproduce the check code, and therefore cannot illegally rewrite the firmware without being detected.
[0044] 8 is a flowchart showing an example of a process for updating firmware. The process of this flowchart is executed by the master CPU 2, for example, when new firmware is stored in the update data storage area 31 in the common storage 3. In the following description, the CPU 1 whose firmware is to be updated may be called the "update target CPU." Also, "updating" firmware includes writing the firmware to memory.
[0045] In S1, the master CPU 2 updates the firmware of the update target CPU. In S2, the pseudo data writing unit 22 writes pseudo data into a free area of the firmware storage area 11F of the update target CPU.
[0046] In S3, the verification unit 23 generates verification challenge data using the random number generator 21. In S4, the verification unit 23 instructs the update target CPU to calculate a check code corresponding to the updated firmware. At this time, the verification unit 23 transmits the verification challenge data generated in S3 to the update target CPU as a parameter for calculating the check code. In response to the calculation instruction, the update target CPU calculates a reference check code (i.e., check code C1) corresponding to the updated firmware using the verification challenge data. In S5, the verification unit 23 stores the verification challenge data generated in S3 in an individual data storage area in the common storage 3 corresponding to the update target CPU.
[0047] In S6, the master CPU 2 acquires the reference check code calculated by the update target CPU. Then, in S7, the master CPU 2 stores the reference check code calculated by the update target CPU in an individual data storage area in the common storage 3 corresponding to the update target CPU.
[0048] 9 is a flowchart showing an example of a process for verifying firmware. The process of this flowchart is executed by the master CPU 2 when a certain CPU 1 is accessed from outside the processor system 100. It is assumed that the verification challenge data and a reference check code (i.e., check code C1) corresponding to the genuine firmware are stored in the common storage 3 according to the procedure shown in FIG.
[0049] In S11, the verification unit 23 acquires verification challenge data from the common storage 3. In S12, the verification unit 23 instructs the CPU to be verified to calculate a check code. Here, the process of S12 is substantially the same as S4 described with reference to FIG. 8. That is, the verification unit 23 transmits the verification challenge data acquired in S11 to the CPU to be verified as a parameter for calculating the check code. Note that, upon receiving the calculation instruction, the CPU to be verified uses the verification challenge data to calculate a verification check code (i.e., check code C2) corresponding to all data in the firmware storage area 11F.
[0050] In S13, the verification unit 23 obtains a reference check code corresponding to the genuine firmware from the common storage 3. In S14, the verification unit 23 obtains a verification check code from the CPU to be verified. Then, in S15, the verification unit 23 compares the reference check code with the verification check code.
[0051] As a result, if the reference check code and the verification check code are the same, the verification unit 23 determines that the CPU to be verified is equipped with genuine firmware. On the other hand, if the reference check code and the verification check code are not the same, the verification unit 23 determines that the CPU to be verified may be equipped with unauthorized firmware. In this case, the master CPU 2 rolls back the firmware of the CPU to be verified.
[0052] <Other embodiments> In the embodiment shown in Figs. 2 to 9, the CPU to be verified calculates a check code, and the master CPU 2 uses the check code to verify the firmware installed in the CPU to be verified. However, in the system configuration shown in Fig. 1, if a failure occurs in the master CPU 2, the operation of the entire processor system 100 will be affected. Therefore, in consideration of this problem, it is preferable that the master CPU 2 is configured to provide only basic functions such as a function to control communication between the CPUs 1a to 1n. Therefore, in another embodiment of the present invention, one of the CPUs 1a to 1n verifies the firmware. However, even in this case, the CPU to be verified itself performs the check code calculation process, which requires a large amount of calculation.
[0053] In another embodiment, the pseudo data writing unit 22 and the verification unit 23 shown in Figures 2 to 7 are implemented in two or more of the CPUs 1a to 1n. In the following description, it is assumed that at least the pseudo data writing unit 22 and the verification unit 23 are implemented in the CPU 1a. However, the random number generator 21 is implemented in the master CPU 2.
[0054] 10 shows a procedure for updating firmware in another embodiment. In this embodiment, CPU 1a operates as a working CPU that executes firmware update processing. Then, the firmware of CPU 1n (that is, the update target CPU) is updated.
[0055] When the firmware FWn is stored in the update data storage area 31 as the update firmware, the master CPU 2 clears the firmware storage area 11F of the update target CPU. The master CPU 2 also grants the working CPU the authority to update the firmware of the update target CPU. Furthermore, the master CPU 2 generates a random number to be used as pseudo data and stores it in a predetermined area of the common storage 3.
[0056] The working CPU writes the firmware FWn and the pseudo data to the firmware storage area 11F of the update target CPU. After that, the master CPU 2 restarts the update target CPU.
[0057] The master CPU 2 generates a random number to be used as verification challenge data. The verification challenge data is stored by the master CPU 2 in an individual data storage area in the common storage 3 that is provided for the update target CPU.
[0058] The working CPU acquires the verification challenge data from the common storage 3. Then, the working CPU transmits a check code calculation instruction and the verification challenge data to the update target CPU.
[0059] The update target CPU calculates a reference check code (i.e., check code C1) in response to the check code calculation instruction. The reference check code is calculated for the verification challenge data and all data in the firmware storage area 11F. The update target CPU then transmits the calculated reference check code to the master CPU2. The master CPU2 then stores the reference check code in an individual data storage area in the common storage 3 that is provided for the update target CPU.
[0060] Fig. 11 shows a procedure for verifying firmware in another embodiment. It is assumed that the verification challenge data and the reference check code are stored in the individual data storage area provided for the CPU to be verified by the procedure shown in Fig. 10.
[0061] The master CPU 2 grants the working CPU the authority to verify the firmware of the verification target CPU. The working CPU then obtains the verification challenge data from the individual data storage area provided for the verification target CPU. The working CPU then transmits a check code calculation instruction and the verification challenge data to the verification target CPU.
[0062] The CPU to be verified calculates a verification check code (i.e., check code C2) in response to the check code calculation instruction. The verification check code is calculated for the verification challenge data and all data in the firmware storage area 11F, similar to the reference check code. The CPU to be verified then transmits the calculated verification check code to the working CPU.
[0063] The working CPU acquires a reference check code from an individual data storage area provided for the CPU to be verified. Then, the working CPU compares the reference check code with the verification check code and reports the comparison result to the master CPU 2. At this time, if the reference check code and the verification check code are not the same, the working CPU rolls back the firmware of the CPU to be verified.
[0064] In this way, in the other embodiment, a CPU 1 other than the CPU to be verified among the CPUs 1a to 1n verifies the firmware implemented in the CPU to be verified. However, even in this configuration, the calculation of the check code is executed by the CPU to be verified itself. Therefore, also in the other embodiment, the CPU 1 other than the CPU to be verified can execute the original process without delay. Note that the effect of writing pseudo data to the free area of the firmware storage area 11F and the effect of using the verification challenge data in the calculation of the check code are substantially the same as in the embodiment shown in FIGS. 2 to 9 and the other embodiment shown in FIGS. 10 to 11. [Explanation of symbols]
[0065] 1(1a~1n) CPU 2 Master CPU 3. Common Storage 11. Memory 11F Firmware storage area 12 Check code calculation section 21 Random Number Generator 22 Pseudo data writing section 23 Verification Department 31 Update data storage area 32a~32n Individual data storage area 100 processor system
Claims
1. A processor system including a plurality of processors and a master processor for controlling communication among the plurality of processors, a pseudo data writing unit that writes pseudo data into a free area of the firmware storage area when writing firmware into the firmware storage area of a first processor of the plurality of processors or when updating firmware stored in the firmware storage area; a verification unit that, when a verification check code is calculated by a predetermined calculation on the entire firmware storage area in the first processor, verifies the firmware written in the firmware storage area based on the verification check code; A processor system comprising:
2. When writing firmware into a firmware storage area of the first processor or updating firmware stored in the firmware storage area, the verification unit provides the first processor with verification data and stores the verification data in a predetermined storage area provided for the first processor; the verification unit stores in the storage area a reference check code calculated by executing the predetermined calculation on the entire firmware storage area using the verification data in the first processor; When verifying the firmware written in the firmware storage area of the first processor, the verification unit obtains the verification data from the storage area and provides the verification data to the first processor; When the verification check code is calculated by executing the predetermined calculation on the entire firmware storage area using the verification data in the first processor, the verification unit verifies the firmware written in the firmware storage area of the first processor by comparing the reference check code stored in the save area with the verification check code.
2. The processor system according to claim 1.
3. The master processor prohibits the first processor from accessing the storage area.
3. The processor system according to claim 2.
4. The pseudo data writing unit and the verifying unit are implemented in the master processor.
2. The processor system according to claim 1.
5. The pseudo data writing unit and the verifying unit are implemented in a second processor different from the first processor among the plurality of processors.
2. The processor system according to claim 1.
Citation Information
Patent Citations
Water heater
JP2020133958A
Cited By
Firmware configuration verification method and device, management controller and storage medium
CN119739435A
