Firmware integrity verification method and device, storage medium, vehicle controller and vehicle
By carrying firmware upgrade data and related attribute information in the firmware upgrade file, and combining the reference verification information for integrity verification, the problem of insufficient integrity verification during firmware upgrade in the existing technology is solved, and security and reliability are improved.
Patent Information
- Application Number
- CN202411896634.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-15
AI Technical Summary
During the existing firmware upgrade process, the reliability of integrity verification is insufficient, which can easily lead to safety risks in the vehicle firmware upgrade process.
By carrying firmware upgrade data and firmware-related attribute information in the firmware upgrade file, and combining the reference verification information at the on-board system, the firmware upgrade file is subject to integrity verification processing.
Improves the security and reliability of firmware upgrade file integrity verification, and reduces the security risks during vehicle firmware upgrade.
Smart Images

Figure CN119830358A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of firmware upgrade technology, and in particular to a firmware integrity verification method, device, storage medium, vehicle controller and vehicle. Background Art
[0002] With the development of the national economy and the improvement of national consumption levels, cars have been widely introduced into ordinary families. In order to cope with the rapid development of technology and the ever-changing needs of users, it is an important task to upgrade the firmware of cars to fix vulnerabilities, enhance functions or improve performance to ensure that the vehicle can meet actual needs and maintain normal operation. At present, during the firmware upgrade process at the vehicle, any damage or incorrect firmware upgrade data may cause vehicle failure, performance degradation and even bring safety risks. Therefore, the integrity of the firmware upgrade data is usually checked based on its hash value. However, the reliability of this integrity verification scheme is insufficient, which easily leads to safety risks in the vehicle firmware upgrade process. Summary of the invention
[0003] Based on this, the present invention provides a firmware integrity verification method, device, storage medium, vehicle controller and vehicle. The firmware integrity verification method can improve the security and reliability of integrity verification of firmware upgrade files, thereby helping to reduce the security risks existing during vehicle firmware upgrades.
[0004] In one aspect, the present invention provides a firmware integrity verification method, the method comprising:
[0005] Obtain the firmware upgrade file required to upgrade the vehicle system firmware;
[0006] Determine the target verification information carried in the firmware upgrade file; the target verification information includes firmware upgrade data and firmware related attribute information;
[0007] Obtaining benchmark verification information related to firmware upgrade at the vehicle-mounted system;
[0008] Based on the target verification information and the benchmark verification information, an integrity verification process is performed on the firmware upgrade file to obtain an integrity verification result of the firmware upgrade file.
[0009] Further, in some implementations, determining the target verification information carried in the firmware upgrade file includes:
[0010] Extracting unique identification information of a target vehicle-mounted module that can be upgraded using the firmware upgrade file from the firmware upgrade file to obtain firmware-related attribute information;
[0011] The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes:
[0012] Obtaining unique identification information of a preset vehicle-mounted module included in the vehicle-mounted system;
[0013] The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes:
[0014] It is determined whether the unique identification information of the target vehicle-mounted module belongs to the unique identification information of the preset vehicle-mounted module.
[0015] Further, in some implementations, determining the target verification information carried in the firmware upgrade file includes:
[0016] Extract the target firmware version information from the firmware upgrade file to obtain the firmware related attribute information;
[0017] The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes:
[0018] Acquire preset firmware version information of a firmware file of the same type as the firmware upgrade file in the vehicle-mounted system;
[0019] The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes:
[0020] Determine whether the target firmware version information is not lower than the preset firmware version information.
[0021] Further, in some implementations, determining the target verification information carried in the firmware upgrade file includes:
[0022] Extract the target firmware release time information from the firmware upgrade file to obtain the firmware related attribute information;
[0023] The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes:
[0024] Acquire preset firmware release time information of a firmware file of the same type as the firmware upgrade file in the vehicle-mounted system;
[0025] The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes:
[0026] It is determined whether the target firmware release time information is later than the preset firmware release time information.
[0027] Further, in some implementations, determining the target verification information carried in the firmware upgrade file includes:
[0028] Extracting target supplier identification information from the firmware upgrade file to obtain the firmware-related attribute information; wherein the target supplier identification information is used to identify at least one of a supplier of the firmware upgrade file or a supplier of a target vehicle-mounted module that can be upgraded using the firmware upgrade file;
[0029] The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes:
[0030] Acquire preset supplier identification information from the vehicle-mounted system that is consistent with the type of the target supplier identification information;
[0031] The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes:
[0032] Determine whether the target supplier identification information is consistent with the preset supplier identification information.
[0033] Further, in some implementations, determining the target verification information carried in the firmware upgrade file includes:
[0034] Extracting a target magic number for identifying a file format of the firmware upgrade file from the firmware upgrade file to obtain the firmware-related attribute information;
[0035] The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes:
[0036] Obtaining a preset magic number corresponding to a firmware file at the vehicle-mounted system;
[0037] The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes:
[0038] It is determined whether the target magic number belongs to the preset magic number.
[0039] Furthermore, in some implementations, the determining the target verification information carried in the firmware upgrade file further includes:
[0040] If the target magic number belongs to the preset magic number, extracting the firmware upgrade data and other firmware-related attribute information from the firmware upgrade file based on the preset firmware file format information corresponding to the target magic number;
[0041] The other firmware-related attribute information includes: unique identification information of a target vehicle-mounted module that can be upgraded using the firmware upgrade file, target firmware version information, target firmware release time information, and target supplier identification information.
[0042] Further, in some implementations, the other firmware-related attribute information further includes: a base hash value of the firmware upgrade data;
[0043] The integrity check process of the firmware upgrade file further includes:
[0044] Based on a preset hash algorithm, the firmware upgrade data is hashed to obtain a target hash value of the firmware upgrade data; wherein the preset hash algorithm is a hash algorithm used to generate the reference hash value;
[0045] Determine whether the target hash value is consistent with the reference hash value.
[0046] Further, in some implementations, the obtaining of a firmware upgrade file required for performing a firmware upgrade on the vehicle-mounted system includes:
[0047] Using a target controller at a vehicle, obtaining the firmware upgrade file downloaded from an over-the-air download server by an over-the-air download host at the vehicle, or reading the firmware upgrade file from a mobile storage device connected to the vehicle by wire;
[0048] If the target controller is a designated controller of the vehicle-mounted system that needs to be upgraded in firmware, the step of obtaining benchmark verification information related to the firmware upgrade of the vehicle-mounted system includes:
[0049] Obtaining the benchmark verification information stored at the target controller;
[0050] If the target controller does not belong to the designated controller of the vehicle-mounted system that needs to perform firmware upgrade, the step of obtaining benchmark verification information related to the firmware upgrade of the vehicle-mounted system includes:
[0051] Using the target controller to send a request for obtaining the benchmark verification information to the designated controller;
[0052] The benchmark verification information fed back by the designated controller in response to the acquisition request is received.
[0053] Further, in some implementations, after performing integrity verification processing on the firmware upgrade file to obtain the integrity verification result of the firmware upgrade file, the method further includes:
[0054] If the integrity check result indicates that the firmware upgrade file has passed the integrity check, and the target controller is a designated controller in the vehicle-mounted system that needs to be firmware upgraded, then the firmware upgrade file is written into a non-volatile memory in the target controller;
[0055] If the integrity check result indicates that the firmware upgrade file has passed the integrity check and the target controller belongs to the designated controller in the vehicle system that requires firmware upgrade, the firmware upgrade file is sent to the designated controller; the designated controller is used to write the firmware upgrade file into the non-volatile memory at the designated controller.
[0056] On the other hand, the present invention also provides a firmware integrity verification device, comprising:
[0057] A first acquisition module is used to acquire a firmware upgrade file required for performing a firmware upgrade on the vehicle-mounted system;
[0058] A determination module, used to determine the target verification information carried in the firmware upgrade file; the target verification information includes firmware upgrade data and firmware related attribute information;
[0059] A second acquisition module, used to acquire benchmark verification information related to firmware upgrade at the vehicle-mounted system;
[0060] The verification module is used to perform integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information to obtain an integrity verification result of the firmware upgrade file.
[0061] On the other hand, the present invention further provides a storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the steps of the above method.
[0062] On the other hand, the present invention further provides a vehicle controller, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the above method.
[0063] On the other hand, the present invention also provides a vehicle, comprising the above-mentioned firmware integrity verification device or vehicle controller.
[0064] According to the firmware integrity verification method provided by the present invention, by making the firmware upgrade file required for the firmware upgrade of the vehicle-mounted system carry firmware upgrade data and firmware-related attribute information, and combining the above-mentioned firmware upgrade data, firmware-related attribute information and benchmark verification information related to the firmware upgrade at the vehicle-mounted system, the firmware upgrade file is subjected to integrity verification processing, which is beneficial to improving the security and reliability when performing integrity verification on the firmware upgrade file, and further can reduce the security risks existing during the vehicle firmware upgrade to ensure the normal operation of the vehicle.
[0065] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 A flowchart of a firmware integrity verification method provided by an embodiment of the present invention;
[0067] Figure 2 A schematic diagram of a firmware integrity verification scenario provided by an embodiment of the present invention;
[0068] Figure 3 A schematic diagram of the structure of a firmware integrity verification device provided by an embodiment of the present invention;
[0069] Figure 4 A schematic structural diagram of a vehicle controller provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0071] In the description of one or more embodiments of the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0072] With the continuous maturity and development of technology, firmware upgrade technology has shown great potential in the automotive field. By using firmware upgrade technology to update and maintain the firmware program in the car, it provides new possibilities for vehicle fault maintenance, function enhancement, and safety improvement. Since the firmware upgrade file may be different from the actual firmware upgrade file obtained by the vehicle due to errors, interference, human tampering, etc. in the data transmission or storage process, which may lead to vehicle failure, performance degradation, and even safety risks, it is necessary to perform integrity verification on the firmware upgrade file required for use during the firmware upgrade process at the vehicle to determine whether the firmware upgrade file is damaged or tampered with.
[0073] At present, a benchmark hash value corresponding to a firmware upgrade file is usually generated in advance, and the benchmark hash value is stored separately in a verification file. When the firmware is upgraded, the firmware upgrade file and the verification file are sent to the controller at the vehicle. If the target hash value calculated by the controller at the vehicle for the firmware upgrade file is consistent with the benchmark hash value recorded in the verification file, it can be considered that the firmware upgrade file has passed the integrity check. However, since the above integrity verification scheme is relatively simple, other people can tamper with the benchmark hash values in the firmware upgrade file and the verification file so that the tampered firmware upgrade file passes the integrity check, making the reliability of this integrity verification scheme insufficient, which can easily cause security risks in the vehicle firmware upgrade process.
[0074] Based on this, the present invention proposes a firmware integrity verification method, which can carry firmware upgrade data and firmware-related attribute information in the firmware upgrade file required for the vehicle-mounted system firmware upgrade, so as to increase the difficulty for personnel to identify, obtain and tamper with the core data of the firmware upgrade data required for the firmware upgrade; and, by combining the above-mentioned firmware upgrade data, firmware-related attribute information and benchmark verification information related to the firmware upgrade at the vehicle-mounted system, the firmware upgrade file is subjected to integrity verification processing to increase the types of verifiable information, which is beneficial to improving the security and reliability when performing integrity verification on the firmware upgrade file, and further reducing the security risks existing during the vehicle firmware upgrade to ensure the normal operation of the vehicle.
[0075] See also Figure 1 , which is a flowchart of a firmware integrity verification method provided by an embodiment of the present invention. From a program perspective, the execution subject of the process can be a program for managing the firmware upgrade process installed in a vehicle control device or a vehicle. Alternatively, the execution subject of the process can also be a vehicle control device or a vehicle, or other devices that can communicate with a vehicle control device or a vehicle, without specific limitation.
[0076] The following is for Figure 1 The process shown is described in detail, and the firmware integrity verification method may specifically include the following steps:
[0077] Step S102, obtaining a firmware upgrade file required for performing a firmware upgrade on the vehicle-mounted system.
[0078] In an embodiment of the present invention, the vehicle-mounted system may be various functional systems installed in the vehicle and realized by software, hardware or a combination of both, for example, an intelligent cockpit system, a braking system, a driving system, a steering system, etc., without specific limitation.
[0079] In an embodiment of the present invention, the firmware upgrade technology may refer to a technology that modifies or replaces the firmware code inside the device to fix errors, add new functions or improve performance. Based on this, when it is necessary to upgrade the firmware of the vehicle-mounted system, the corresponding firmware upgrade file can be obtained, and the original firmware file at the vehicle-mounted system can be replaced by the firmware upgrade file, or the firmware upgrade file can be added to the vehicle-mounted system to achieve the firmware upgrade of the vehicle-mounted system. In actual applications, there can be many types of firmware upgrade files, for example, they can include img files, elf files, mbn files, bin files, etc., and there is no specific limitation on this.
[0080] Step S104, determining target verification information carried in the firmware upgrade file; the target verification information includes firmware upgrade data and firmware-related attribute information.
[0081] In the embodiment of the present invention, when performing integrity check on the firmware upgrade file, it is usually necessary to use at least two types of information, namely, firmware upgrade data and firmware-related attribute information carried in the firmware upgrade file.
[0082] The firmware upgrade data may provide control logic for the hardware, which may be a software program for implementing at least part of the functions of the vehicle-mounted system. During the firmware upgrade process, if the firmware upgrade data is damaged or incorrect, it may often cause the vehicle-mounted system to malfunction, degrade performance, or even bring security risks. Therefore, it is usually necessary to perform integrity check based on the firmware upgrade data to determine the security and reliability of the firmware upgrade file.
[0083] The firmware-related attribute information may reflect the relevant basic information of the firmware upgrade file and the firmware upgrade data, for example, it may reflect the applicable scope, version information, release time information, supplier information, etc. of the firmware file, without specific limitation. Since the firmware-related attribute information can usually assist in determining whether the firmware upgrade file meets the actual upgrade requirements, if it does not meet the requirements, it may be caused by the firmware upgrade file being tampered with. Therefore, an integrity check may be performed based on the firmware-related attribute information to determine the security and reliability of the firmware upgrade file.
[0084] Step S106, obtaining benchmark verification information related to firmware upgrade at the vehicle-mounted system.
[0085] In the embodiment of the present invention, when the firmware upgrade file is used to upgrade the firmware of the vehicle-mounted system, it is usually necessary to ensure that the vehicle-mounted system is within the applicable scope of the firmware upgrade file, and the version, release time, and supplier of the firmware upgrade file also need to meet the firmware upgrade requirements for the vehicle-mounted system. Based on this, benchmark verification information related to the firmware upgrade can be obtained from the vehicle-mounted system, so that the benchmark verification information can be used to verify the firmware-related attribute information that can reflect the applicable scope, version information, release time information, supplier information, etc. of the firmware upgrade file. In actual applications, the types of the benchmark verification information and the firmware-related attribute information can usually be consistent. Of course, there can also be differences between the two, and the types of data contained in the two are not specifically limited here.
[0086] Step S108: Based on the target verification information and the reference verification information, an integrity verification process is performed on the firmware upgrade file to obtain an integrity verification result of the firmware upgrade file.
[0087] In an embodiment of the present invention, the firmware-related attribute information in the target verification information can be compared with the benchmark verification information to determine whether the firmware upgrade file is applicable to the firmware upgrade process of the vehicle-mounted system; and a hash check can be performed on the firmware upgrade data in the target verification information; thereby, the integrity and credibility of the core data, namely the firmware upgrade data required for the firmware upgrade, can be guaranteed, and the reliability and security of the integrity check results can be improved, thereby having good practicality.
[0088] In a feasible implementation manner, determining the target verification information carried in the firmware upgrade file may include:
[0089] The unique identification information of the target vehicle-mounted module that can be upgraded using the firmware upgrade file is extracted from the firmware upgrade file to obtain the firmware-related attribute information.
[0090] Correspondingly, the obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system may include:
[0091] Acquire unique identification information of a preset vehicle-mounted module included in the vehicle-mounted system.
[0092] Correspondingly, the performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information may include:
[0093] It is determined whether the unique identification information of the target vehicle-mounted module belongs to the unique identification information of the preset vehicle-mounted module.
[0094] In an embodiment of the present invention, the vehicle-mounted software module or vehicle-mounted hardware module that has a firmware upgrade requirement can be pre-set with respective unique identification information (e.g., name or ID, etc.) according to actual needs. Based on this, before generating the firmware upgrade file, the unique identification information of the target vehicle-mounted module that can be upgraded can be clarified, and the unique identification information of the target vehicle-mounted module can be carried in the firmware upgrade file, so that when the integrity check is performed on the firmware upgrade file, the unique identification information of the target vehicle-mounted module carried in the firmware upgrade file can be extracted.
[0095] In practical applications, the unique identification information of the preset vehicle-mounted module (for example, the vehicle-mounted software module or the vehicle-mounted hardware module) contained in the vehicle-mounted system can usually be predetermined. When performing an integrity check on the firmware upgrade file, it can be identified whether the unique identification information of the preset vehicle-mounted module contained in the vehicle-mounted system contains the unique identification information of the target vehicle-mounted module carried in the firmware upgrade file; if so, it can usually be said that the firmware upgrade file is indeed suitable for firmware upgrades to the vehicle-mounted system. At this time, the possibility of the firmware upgrade file being tampered with or damaged is usually low, and therefore, it can be considered that the firmware upgrade file has passed this part of the integrity check. Similarly, if the unique identification information of the preset vehicle-mounted module does not contain the unique identification information of the target vehicle-mounted module, it can be considered that the firmware upgrade file has not passed this part of the integrity check, which will not be elaborated on.
[0096] In a feasible implementation manner, determining the target verification information carried in the firmware upgrade file may include:
[0097] The target firmware version information is extracted from the firmware upgrade file to obtain the firmware related attribute information.
[0098] Correspondingly, the obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system may include:
[0099] Acquire preset firmware version information of a firmware file of the same type as the firmware upgrade file, which is held by the vehicle-mounted system.
[0100] Correspondingly, the performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information may include:
[0101] Determine whether the target firmware version information is not lower than the preset firmware version information.
[0102] In the embodiment of the present invention, due to reasonable version management, the release and update of the firmware can be better managed, and the correct installation and update of the firmware can be promoted according to the firmware version information to avoid the situation where the lower version covers the higher version. Based on this, the target firmware version information corresponding to the firmware upgrade file can be set in advance according to actual needs, and the target firmware version information can be carried in the firmware upgrade file, so that when the integrity check is performed on the firmware upgrade file, the target firmware version information carried in the firmware upgrade file can be extracted.
[0103] In actual applications, the vehicle-mounted system may generally store a firmware file of the same type as the firmware upgrade file, based on which the preset firmware version information of the firmware file of the same type as the firmware upgrade file in the vehicle-mounted system may be obtained.
[0104] Since the firmware version information will not be modified when repairing some vulnerabilities or in other special circumstances, the preset firmware version information of the firmware file of the same type as the firmware upgrade file in the vehicle system can be consistent with the target firmware version information carried in the firmware upgrade file. Of course, in most cases, the target firmware version information needs to be higher than the preset firmware version information.
[0105] Based on this, when it is determined that the target firmware version information is not lower than the preset firmware version information, it can usually be said that the firmware upgrade file is indeed suitable for upgrading the firmware of the vehicle-mounted system. At this time, the possibility of the firmware upgrade file being tampered with or damaged is usually low. Therefore, it can be considered that the firmware upgrade file has passed this part of the integrity check. Similarly, if it is determined that the target firmware version information is lower than the preset firmware version information, it can be considered that the firmware upgrade file has not passed this part of the integrity check, or it can be combined with other strategies to finally decide whether the firmware upgrade file can pass this part of the integrity check. There is no specific limitation on this.
[0106] In actual applications, if the firmware upgrade file is a newly added firmware file, at this time, it may not be possible to obtain the preset firmware version information of the firmware file that is consistent with the type of the firmware upgrade file at the vehicle system. Therefore, other strategies can also be combined to decide whether the firmware upgrade file can pass this part of the integrity check, and no specific limitation is made on this.
[0107] In a feasible implementation manner, determining the target verification information carried in the firmware upgrade file may include:
[0108] The target firmware release time information is extracted from the firmware upgrade file to obtain the firmware related attribute information.
[0109] Correspondingly, the obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system may include:
[0110] The preset firmware release time information of a firmware file of the same type as the firmware upgrade file and which is in the vehicle-mounted system is obtained.
[0111] Correspondingly, the performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information may include:
[0112] It is determined whether the target firmware release time information is later than the preset firmware release time information.
[0113] In an embodiment of the present invention, in order to facilitate better management of firmware upgrade files, the target firmware release time information corresponding to the firmware upgrade file can usually be predetermined, and the target firmware release time information can be carried in the firmware upgrade file, so that when the integrity check is performed on the firmware upgrade file, the target firmware version information carried in the firmware upgrade file can be extracted. Among them, the target firmware release time information can include the date when the supplier delivers the firmware upgrade file, or the date when the firmware upgrade file is released for firmware upgrade, etc., which is not specifically limited.
[0114] In actual applications, the vehicle-mounted system may generally store a firmware file of the same type as the firmware upgrade file, based on which the preset firmware release time information of the firmware file of the same type as the firmware upgrade file in the vehicle-mounted system may be obtained.
[0115] Since the release time of the firmware file of the same type as the firmware upgrade file at the vehicle-mounted system is usually earlier than the target firmware release time information of the firmware upgrade file, therefore, when it is determined that the target firmware release time information is later than the preset firmware release time information, it can usually be said that the firmware upgrade file is indeed suitable for firmware upgrades to the vehicle-mounted system. At this time, the possibility of the firmware upgrade file being tampered with or damaged is usually low. Therefore, it can be considered that the firmware upgrade file has passed this part of the integrity check. Similarly, if it is determined that the target firmware release time information is earlier than the preset firmware release time information, it can be considered that the firmware upgrade file has not passed this part of the integrity check, or it can be combined with other strategies to finally decide whether the firmware upgrade file can pass this part of the integrity check. There is no specific limitation on this.
[0116] In actual applications, if the firmware upgrade file is a newly added firmware file, at this time, it may not be possible to obtain the preset firmware release time information of the firmware file consistent with the type of the firmware upgrade file at the vehicle system. Therefore, other strategies can also be combined to decide whether the firmware upgrade file can pass this part of the integrity check, and no specific limitation is made on this.
[0117] In a feasible implementation manner, determining the target verification information carried in the firmware upgrade file may include:
[0118] Extract target supplier identification information from the firmware upgrade file to obtain the firmware-related attribute information; wherein the target supplier identification information is used to identify at least one of the supplier of the firmware upgrade file or the supplier of the target vehicle-mounted module that can be upgraded using the firmware upgrade file.
[0119] Correspondingly, the obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system may include:
[0120] Acquire preset supplier identification information from the vehicle-mounted system that is consistent with the type of the target supplier identification information.
[0121] Correspondingly, the performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information may include:
[0122] Determine whether the target supplier identification information is consistent with the preset supplier identification information.
[0123] In an embodiment of the present invention, in order to ensure the compatibility between the firmware upgrade file and the vehicle-mounted system, it is usually necessary to use the firmware upgrade file developed by the same supplier to replace the original firmware file at the vehicle-mounted system, or to use the firmware upgrade file developed by the supplier of the target vehicle-mounted module to perform firmware upgrade on the target vehicle-mounted module. Based on this, the corresponding target supplier identification information (for example, information for identifying the supplier of the firmware upgrade file or the supplier of the target vehicle-mounted module that can be upgraded using the firmware upgrade file) can usually be carried in the firmware upgrade file, so that when the integrity check is performed on the firmware upgrade file, the target supplier identification information carried in the firmware upgrade file can be extracted.
[0124] In actual applications, the vehicle-mounted system can usually store information about suppliers of firmware files that are consistent with the type of the firmware upgrade file, or information about suppliers of target vehicle-mounted modules that can be upgraded using the firmware upgrade file. Therefore, the above information can be extracted as preset supplier identification information. If it is determined that the preset supplier identification information is consistent with the target supplier identification information, it can usually be said that the firmware upgrade file is indeed suitable for firmware upgrades to the vehicle-mounted system. At this time, the possibility of the firmware upgrade file being tampered with or damaged is usually low. Therefore, it can be considered that the firmware upgrade file has passed this part of the integrity check. Similarly, if the preset supplier identification information is inconsistent with the target supplier identification information, it can be considered that the firmware upgrade file has not passed this part of the integrity check, or it can be combined with other strategies to finally decide whether the firmware upgrade file can pass this part of the integrity check. There is no specific limitation on this.
[0125] In actual applications, if the firmware upgrade file is a newly added firmware file, it may not be possible to obtain the supplier information of the firmware file of the same type as the firmware upgrade file at the vehicle system. Therefore, other strategies can also be combined to decide whether the firmware upgrade file can pass this part of the integrity check, and no specific limitation is made on this.
[0126] In a feasible implementation manner, determining the target verification information carried in the firmware upgrade file may include:
[0127] A target magic number for identifying a file format of the firmware upgrade file is extracted from the firmware upgrade file to obtain the firmware-related attribute information.
[0128] Correspondingly, the obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system may include:
[0129] Obtain a preset magic number corresponding to a firmware file at the vehicle-mounted system.
[0130] Correspondingly, the performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information may include:
[0131] It is determined whether the target magic number belongs to the preset magic number.
[0132] In an embodiment of the present invention, a magic number may generally refer to information used to mark a file format, and the data structure of the file may be clarified according to the magic number carried in the file, so as to facilitate parsing the file. Based on this, a target magic number used to identify the file format of a firmware upgrade file may be carried in the firmware upgrade file, so that when an integrity check is performed on the firmware upgrade file, the target magic number carried in the firmware upgrade file may be extracted.
[0133] In practical applications, it is usually possible to pre-set various preset magic numbers corresponding to various firmware file formats supported by the vehicle-mounted system. Therefore, when performing an integrity check on the firmware upgrade file, if it is determined that the target magic number carried in the firmware upgrade file belongs to the preset magic number supported by the vehicle-mounted system, it can usually be said that the firmware upgrade file is indeed suitable for firmware upgrades for the vehicle-mounted system. At this time, the possibility of the firmware upgrade file being tampered with or damaged is usually low. Therefore, it can be considered that the firmware upgrade file has passed this part of the integrity check. Similarly, if it is determined that the target magic number does not belong to the preset magic number supported by the vehicle-mounted system, it can be considered that the firmware upgrade file has not passed this part of the integrity check, or it can be combined with other strategies to finally decide whether the firmware upgrade file can pass this part of the integrity check. There is no specific limitation on this.
[0134] In a feasible implementation manner, the determining the target verification information carried in the firmware upgrade file may also include:
[0135] If the target magic number belongs to the preset magic number, the firmware upgrade data and other firmware-related attribute information are extracted from the firmware upgrade file based on preset firmware file format information corresponding to the target magic number.
[0136] The other firmware-related attribute information includes: unique identification information of a target vehicle-mounted module that can be upgraded using the firmware upgrade file, target firmware version information, target firmware release time information, and target supplier identification information.
[0137] In an embodiment of the present invention, the preset firmware file format information corresponding to the target magic number can generally reflect the location information and data volume of various types of information contained in the firmware upgrade file, so that the required various types of firmware-related attribute information and firmware upgrade data can be accurately extracted from the firmware upgrade file according to the preset firmware file format information.
[0138] For ease of understanding, multiple implementations of the preset firmware file format information are provided herein.
[0139]
[0140] Table 1
[0141] Table 1 shows an implementation of the preset firmware file format information. Among them, the "Name" field can be the name of each type of information carried in the firmware upgrade file, the "Byte offsets" field can reflect the location of each type of information carried in the firmware upgrade file, and the "Total bytes" field can reflect the data volume of each type of information carried in the firmware upgrade file.
[0142] Specifically, "Magic number" can be the target magic number, "Module name" and "Module id" can both be unique identification information of the target vehicle module, "Version info" can be the target firmware version information, "Vendorname" can be the target vendor identification information, "Release date" can be the target firmware release time information, "Firmware upgrade data" can be the firmware upgrade data, "Hash value" can be the "base hash value of the firmware upgrade data", "Dummy data" can be obfuscated information, and "Reserved data" can be the data to be expanded. "XXX" can be any positive integer greater than 256, and there is no specific limitation on this.
[0143] Among them, the data corresponding to "Dummy data" may not have any practical significance, so as to increase the difficulty of cracking and tampering with the firmware upgrade file. The data corresponding to "Reserved data" can be empty, so that it can be expanded according to actual needs later to carry other information. Therefore, "Dummy data" and "Reserved data" do not need to participate in the integrity check. Of course, it is also possible to determine whether the firmware upgrade file contains the above-mentioned fields. If so, it can be said that the possibility of the firmware upgrade file being tampered with or damaged is usually low. Therefore, it can also be considered that the firmware upgrade file has passed this part of the integrity check. There is no specific limitation on this.
[0144]
[0145] Table 2
[0146] Table 2 shows another implementation of the preset firmware file format information. Among them, the meanings of the "Name" field, the "Byte offsets" field, and the "Total bytes" field can be the same as those of the above fields in Table 1, which will not be repeated. It is worth noting that the "Dummy data" field in Table 2 is located between the firmware upgrade data composed of "Firmware upgrade data1" and "Firmware upgrade data2", and "N" and "M" can be flexibly set, and the values of "N" and "M" corresponding to the same type of firmware upgrade files generated at different times can be the same or different, which is conducive to increasing the difficulty of cracking and tampering with the firmware upgrade file, and no specific limitation is made to this. Of course, the preset firmware file format information can also have other forms, which are not specifically limited to this.
[0147] In actual applications, the firmware upgrade file usually also needs to be generated according to the preset firmware file format information. For example, the firmware-related attribute information can be used as a firmware header, and the firmware upgrade data can be set after the firmware header, and then packaged to generate the firmware upgrade file. Alternatively, the firmware upgrade file can be generated by combining the firmware-related attribute information and the firmware upgrade data according to the preset position and preset data volume of each type of information. Among them, the firmware upgrade data can be the data of the firmware upgrade file currently used in the scheme that only performs complete verification based on hash values. For example, the firmware upgrade data can be the data of the firmware in img format, elf format, or mbn format, and there is no specific limitation on this.
[0148] In a feasible implementation manner, the other firmware-related attribute information may further include: a baseline hash value of the firmware upgrade data.
[0149] Correspondingly, the integrity check process on the firmware upgrade file may also include:
[0150] Based on a preset hash algorithm, a hash calculation process is performed on the firmware upgrade data to obtain a target hash value of the firmware upgrade data; wherein the preset hash algorithm is a hash algorithm used to generate the reference hash value.
[0151] Determine whether the target hash value is consistent with the reference hash value.
[0152] In an embodiment of the present invention, the reference hash value of the firmware upgrade data carried in the firmware upgrade file may refer to a hash value obtained by performing a hash calculation on the authentic and authentic firmware upgrade data using a preset hash algorithm. If a target hash value is calculated using the preset hash algorithm for the firmware upgrade data carried in the firmware upgrade file acquired by the vehicle, then when it is determined that the target hash value is consistent with the reference hash value, it can be considered that the possibility of the firmware upgrade file being tampered with or damaged is low, and therefore, it can be determined that the firmware upgrade file has passed this part of the integrity check. If the target hash value is inconsistent with the reference hash value, it can be determined that the firmware upgrade file has not passed this part of the integrity check, which is convenient and quick.
[0153] In a feasible implementation manner, obtaining the firmware upgrade file required for performing firmware upgrade on the vehicle-mounted system may include:
[0154] The target controller at the vehicle is used to obtain the firmware upgrade file downloaded from the over-the-air download server by the over-the-air download host at the vehicle, or the firmware upgrade file is read from a mobile storage device connected to the vehicle by wire.
[0155] If the target controller is a designated controller of the vehicle-mounted system that needs to be upgraded in firmware, obtaining benchmark verification information related to the firmware upgrade of the vehicle-mounted system may include:
[0156] The benchmark verification information stored at the target controller is obtained.
[0157] If the target controller does not belong to the designated controller of the vehicle-mounted system that needs to perform firmware upgrade, obtaining benchmark verification information related to the firmware upgrade of the vehicle-mounted system may include:
[0158] The target controller is used to send a request for obtaining the benchmark verification information to the designated controller.
[0159] The benchmark verification information fed back by the designated controller in response to the acquisition request is received.
[0160] In the embodiment of the present invention, the OTA Master can be an application installed in the vehicle and responsible for initiating and managing the entire OTA upgrade process. When it is determined that the vehicle meets the upgrade conditions, it can use mobile communication technology to download the firmware upgrade file from the OTA server to the vehicle. Since the entire upgrade process can be done without user intervention, it is convenient and fast, and thus suitable for large-scale deployment.
[0161] In practical applications, the target controller (i.e. Figure 1The air download host is deployed at the vehicle (the execution subject of the method), so that the target controller can run the application of the air download host and directly download the upgrade data package to the local target controller, which is convenient and fast. Alternatively, the air download host can also be deployed in other devices at the vehicle (for example, a telematics processor, i.e., a Telematics-BOX; or a gateway device, etc.), so that after the above-mentioned other devices run the application of the air download host and download the firmware upgrade file to the local, the firmware upgrade file can be transmitted to the target controller using Ethernet technology, and there is no specific limitation on this.
[0162] In the embodiment of the present invention, since the over-the-air download upgrade solution is prone to upgrade failure when the network is unstable, the staff can also connect the mobile storage device storing the firmware upgrade file to the vehicle through a universal serial bus (USB) or other hardware interface, so that the target controller at the vehicle can obtain the firmware upgrade file by accessing the mobile storage device, thereby realizing manual upgrade of the embedded device under user intervention, which has good flexibility.
[0163] In actual applications, the mobile storage device can also establish a short-range wireless connection with the vehicle through short-range wireless communication technologies such as Zigbee, WiFi, Bluetooth, Z-wave or NFC, so that the target controller at the vehicle can obtain the firmware upgrade file from the mobile storage device, without specific limitation.
[0164] In an embodiment of the present invention, if the target controller belongs to the designated controller of the vehicle-mounted system that needs to perform a firmware upgrade, the benchmark verification information can be obtained locally from the target controller; if the target controller does not belong to the designated controller of the vehicle-mounted system that needs to perform a firmware upgrade, the target controller can communicate with the designated controller via a CAN bus, SPI bus or Ethernet, etc., so as to obtain the benchmark verification information, which has good flexibility.
[0165] The target controller may include but is not limited to the system-on-chip (SoC), gateway, T-BOX, etc. of the vehicle system, and there is no specific limitation on this. The designated controller may include but is not limited to: the electronic control unit (ECU), microcontroller unit (MCU), etc. of various vehicle systems, and there is no specific limitation on this.
[0166] In a feasible implementation manner, after performing integrity verification processing on the firmware upgrade file and obtaining the integrity verification result of the firmware upgrade file, the method may further include:
[0167] If the integrity check result indicates that the firmware upgrade file has passed the integrity check and the target controller belongs to a designated controller in the vehicle system that needs to perform a firmware upgrade, the firmware upgrade file is written into a non-volatile memory in the target controller.
[0168] If the integrity check result indicates that the firmware upgrade file has passed the integrity check and the target controller belongs to the designated controller in the vehicle system that requires firmware upgrade, the firmware upgrade file is sent to the designated controller; the designated controller is used to write the firmware upgrade file into the non-volatile memory at the designated controller.
[0169] In an embodiment of the present invention, a non-volatile memory may refer to a memory in which the stored data does not disappear when the current is turned off, and is suitable for long-term storage of important data. Based on this, in order to enable the vehicle-mounted system to continuously and stably use the firmware upgrade data to ensure the normal operation of each function, when the vehicle-mounted system is upgraded with firmware, the firmware upgrade data needs to be stored in the non-volatile memory in the designated controller of the vehicle-mounted system that needs to be upgraded with firmware. In practical applications, the non-volatile memory can be implemented in a variety of ways, for example, it can be implemented using EPROM (erasable programmable read-only memory) or EEPROM (electrically erasable programmable read-only memory), or it can also be implemented using Flash memory, UFS (Universal Flash Storage), hard disk, magnetic disk, etc., without specific limitation.
[0170] Specifically, if the target controller that has obtained the firmware upgrade file belongs to the designated controller in the vehicle system that needs to perform a firmware upgrade, the firmware upgrade data in the firmware upgrade file can be stored in a local non-volatile memory; if the target controller does not belong to the designated controller in the vehicle system that needs to perform a firmware upgrade, the target controller can communicate with the designated controller via a CAN bus, SPI bus or Ethernet, thereby sending the firmware upgrade data in the firmware upgrade file to the designated controller, so that the designated controller can store the firmware upgrade data in the local non-volatile memory by itself, which has good flexibility.
[0171] For ease of understanding, Figure 2 A schematic diagram of a firmware integrity verification scenario provided by an embodiment of the present invention. Figure 2 As shown, when it is necessary to perform a firmware upgrade on the vehicle-mounted system at the vehicle 21, the target controller 201 at the vehicle can be used to obtain the firmware upgrade file from the OTA server 22 or the mobile storage device 23. If the target controller 201 itself needs to perform a firmware upgrade, the firmware upgrade data in the firmware upgrade file can be stored in the local non-volatile memory. If other controllers at the vehicle (for example, controller 202, controller 203, etc.) need to perform a firmware upgrade, the target controller 201 can send the firmware upgrade data to controller 202 and controller 203, so that controller 202 and controller 203 can store the firmware upgrade data in the local non-volatile memory by themselves. Thereby, the firmware upgrade requirements for the vehicle can be met efficiently and conveniently.
[0172] See also Figure 3 , is a schematic diagram of the structure of a firmware integrity verification device provided by an embodiment of the present invention. Figure 3 As shown, the firmware integrity verification device 03 can be implemented as all or part of the vehicle controller through software, hardware or a combination of both. According to some embodiments, the firmware integrity verification device 03 may include a first acquisition module 31, a determination module 32, a second acquisition module 33, and a verification module 34, specifically:
[0173] The first acquisition module 31 is used to acquire a firmware upgrade file required for performing a firmware upgrade on the vehicle-mounted system.
[0174] The determination module 32 is used to determine the target verification information carried in the firmware upgrade file; the target verification information includes firmware upgrade data and firmware related attribute information.
[0175] The second acquisition module 33 is used to acquire benchmark verification information related to firmware upgrade at the vehicle-mounted system.
[0176] The verification module 34 is used to perform integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information to obtain an integrity verification result of the firmware upgrade file.
[0177] Optionally, the determining module 32 may include:
[0178] The first extraction unit is used to extract the unique identification information of the target vehicle-mounted module that can be upgraded using the firmware upgrade file from the firmware upgrade file to obtain the firmware-related attribute information.
[0179] The second acquisition module 33 may include:
[0180] The first acquisition unit is used to acquire unique identification information of a preset vehicle-mounted module included in the vehicle-mounted system.
[0181] The verification module 34 may include:
[0182] The first judging unit is used to judge whether the unique identification information of the target vehicle-mounted module belongs to the unique identification information of the preset vehicle-mounted module.
[0183] Optionally, the determining module 32 may include:
[0184] The second extraction unit is used to extract the target firmware version information from the firmware upgrade file to obtain the firmware related attribute information.
[0185] The second acquisition module 33 may include:
[0186] The second acquisition unit is used to acquire preset firmware version information of a firmware file in the vehicle-mounted system that is consistent with the type of the firmware upgrade file.
[0187] The verification module 34 may include:
[0188] The second judging unit is configured to judge whether the target firmware version information is not lower than the preset firmware version information.
[0189] Optionally, the determining module 32 may include:
[0190] The third extraction unit is used to extract the target firmware release time information from the firmware upgrade file to obtain the firmware related attribute information.
[0191] The second acquisition module 33 may include:
[0192] The third acquisition unit is used to acquire preset firmware release time information of a firmware file of the same type as the firmware upgrade file and which is in the vehicle-mounted system.
[0193] The verification module 34 may include:
[0194] The third judgment unit is used to judge whether the target firmware release time information is later than the preset firmware release time information.
[0195] Optionally, the determining module 32 may include:
[0196] The fourth extraction unit is used to extract the target supplier identification information from the firmware upgrade file to obtain the firmware-related attribute information; wherein the target supplier identification information is used to identify at least one of the supplier of the firmware upgrade file or the supplier of the target vehicle-mounted module that can be upgraded using the firmware upgrade file.
[0197] The second acquisition module 33 may include:
[0198] The fourth acquisition unit is used to acquire preset supplier identification information from the vehicle-mounted system that is consistent with the type of the target supplier identification information.
[0199] The verification module 34 may include:
[0200] The fourth judgment unit is used to judge whether the target supplier identification information is consistent with the preset supplier identification information.
[0201] Optionally, the determining module 32 may include:
[0202] The fifth extraction unit is used to extract a target magic number for identifying a file format of the firmware upgrade file from the firmware upgrade file to obtain the firmware-related attribute information.
[0203] The second acquisition module 33 may include:
[0204] The fifth acquisition unit is used to acquire a preset magic number corresponding to the firmware file at the vehicle-mounted system.
[0205] The verification module 34 may include:
[0206] The fifth judging unit is configured to judge whether the target magic number belongs to the preset magic number.
[0207] Optionally, the determining module 32 may be specifically configured to:
[0208] If the target magic number belongs to the preset magic number, the firmware upgrade data and other firmware-related attribute information are extracted from the firmware upgrade file based on preset firmware file format information corresponding to the target magic number.
[0209] The other firmware-related attribute information includes: unique identification information of a target vehicle-mounted module that can be upgraded using the firmware upgrade file, target firmware version information, target firmware release time information, and target supplier identification information.
[0210] Optionally, the other firmware-related attribute information also includes: a baseline hash value of the firmware upgrade data.
[0211] The verification module 34 may include:
[0212] A calculation unit is used to perform hash calculation processing on the firmware upgrade data based on a preset hash algorithm to obtain a target hash value of the firmware upgrade data; wherein the preset hash algorithm is a hash algorithm used to generate the reference hash value.
[0213] The sixth determination unit is configured to determine whether the target hash value is consistent with the reference hash value.
[0214] Optionally, the first acquisition module 31 may be specifically used for:
[0215] The target controller at the vehicle is used to obtain the firmware upgrade file downloaded from the over-the-air download server by the over-the-air download host at the vehicle, or the firmware upgrade file is read from a mobile storage device connected to the vehicle by wire.
[0216] The second acquisition module 33 may include:
[0217] A sixth acquisition unit is configured to acquire the benchmark verification information stored in the target controller if the target controller is a designated controller in the vehicle-mounted system that needs to perform a firmware upgrade.
[0218] A sending unit is used to send a request for obtaining the benchmark verification information to the designated controller by using the target controller if the target controller does not belong to the designated controller of the vehicle-mounted system that needs to perform firmware upgrade.
[0219] A receiving unit is used to receive the benchmark verification information fed back by the designated controller in response to the acquisition request.
[0220] Optional, Figure 3 The device may further include:
[0221] A writing module is used to write the firmware upgrade file into the non-volatile memory of the target controller if the integrity check result indicates that the firmware upgrade file has passed the integrity check and the target controller belongs to the designated controller of the vehicle system that needs to perform firmware upgrade.
[0222] A sending module, used for sending the firmware upgrade file to the designated controller that needs to perform firmware upgrade if the integrity check result indicates that the firmware upgrade file has passed the integrity check and the target controller belongs to the designated controller in the vehicle system that needs to perform firmware upgrade; the designated controller is used for writing the firmware upgrade file into the non-volatile memory in the designated controller.
[0223] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0224] The present invention also provides a storage medium, which can store a computer program. When the computer program is executed by a processor, it can implement the firmware integrity verification method as described in the above embodiments. The specific execution process can be found in the specific description of the above embodiments, which will not be repeated here.
[0225] In one embodiment, the present invention also provides Figure 4 The structural diagram of the vehicle controller is shown in FIG. Figure 4 At the hardware level, the vehicle controller may include a processor 41 and a memory 45, and may also include an internal bus 42, a network interface 43, a memory 44, and other hardware required for other services. The vehicle controller may be arranged in a vehicle, wherein the processor 41 may read the corresponding computer-readable instructions from the memory 45 into the memory and then run them to implement the above-mentioned firmware integrity verification method. The specific execution process may refer to the specific descriptions in the above-mentioned embodiments, and will not be described in detail here.
[0226] In one embodiment, the present invention also provides a vehicle, which may include a firmware integrity verification device or a vehicle controller as described above, so as to execute the steps of the firmware integrity verification method through the firmware integrity verification device or the vehicle controller. The specific execution process can be referred to the specific description in the above embodiments, which will not be repeated here.
[0227] Finally, the various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium, vehicle controller, and vehicle embodiments, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0228] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A firmware integrity verification method, comprising: Obtain the firmware upgrade file required to upgrade the vehicle system firmware; Determining target verification information carried in the firmware upgrade file; The target verification information includes firmware upgrade data and firmware related attribute information; Obtaining benchmark verification information related to firmware upgrade at the vehicle-mounted system; Based on the target verification information and the benchmark verification information, an integrity verification process is performed on the firmware upgrade file to obtain an integrity verification result of the firmware upgrade file.
2. The method according to claim 1, wherein determining the target verification information carried in the firmware upgrade file comprises: Extracting unique identification information of a target vehicle-mounted module that can be upgraded using the firmware upgrade file from the firmware upgrade file to obtain firmware-related attribute information; The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes: Obtaining unique identification information of a preset vehicle-mounted module included in the vehicle-mounted system; The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes: It is determined whether the unique identification information of the target vehicle-mounted module belongs to the unique identification information of the preset vehicle-mounted module.
3. The method according to claim 1, wherein determining the target verification information carried in the firmware upgrade file comprises: Extract the target firmware version information from the firmware upgrade file to obtain the firmware related attribute information; The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes: Acquire preset firmware version information of a firmware file of the same type as the firmware upgrade file in the vehicle-mounted system; The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes: Determine whether the target firmware version information is not lower than the preset firmware version information.
4. The method according to claim 1, wherein determining the target verification information carried in the firmware upgrade file comprises: Extract the target firmware release time information from the firmware upgrade file to obtain the firmware related attribute information; The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes: Acquire preset firmware release time information of a firmware file of the same type as the firmware upgrade file in the vehicle-mounted system; The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes: It is determined whether the target firmware release time information is later than the preset firmware release time information.
5. The method according to claim 1, wherein determining the target verification information carried in the firmware upgrade file comprises: Extracting target supplier identification information from the firmware upgrade file to obtain the firmware-related attribute information; wherein the target supplier identification information is used to identify at least one of a supplier of the firmware upgrade file or a supplier of a target vehicle-mounted module that can be upgraded using the firmware upgrade file; The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes: Acquire preset supplier identification information from the vehicle-mounted system that is consistent with the type of the target supplier identification information; The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes: Determine whether the target supplier identification information is consistent with the preset supplier identification information.
6. The method according to any one of claims 1 to 5, wherein determining the target verification information carried in the firmware upgrade file comprises: Extracting a target magic number for identifying a file format of the firmware upgrade file from the firmware upgrade file to obtain the firmware-related attribute information; The obtaining of benchmark verification information related to the firmware upgrade at the vehicle-mounted system includes: Obtaining a preset magic number corresponding to a firmware file at the vehicle-mounted system; The performing integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information includes: It is determined whether the target magic number belongs to the preset magic number.
7. The method according to claim 6, wherein determining the target verification information carried in the firmware upgrade file further comprises: If the target magic number belongs to the preset magic number, extracting the firmware upgrade data and other firmware-related attribute information from the firmware upgrade file based on the preset firmware file format information corresponding to the target magic number; The other firmware-related attribute information includes: unique identification information of a target vehicle-mounted module that can be upgraded using the firmware upgrade file, target firmware version information, target firmware release time information, and target supplier identification information.
8. The method according to claim 7, wherein the other firmware-related attribute information further comprises: A base hash value of the firmware upgrade data; The integrity check process of the firmware upgrade file further includes: Based on a preset hash algorithm, the firmware upgrade data is hashed to obtain a target hash value of the firmware upgrade data; wherein the preset hash algorithm is a hash algorithm used to generate the reference hash value; Determine whether the target hash value is consistent with the reference hash value.
9. The method according to claim 1, wherein obtaining the firmware upgrade file required for performing firmware upgrade on the vehicle-mounted system comprises: Using a target controller at a vehicle, obtaining the firmware upgrade file downloaded from an over-the-air download server by an over-the-air download host at the vehicle, or reading the firmware upgrade file from a mobile storage device connected to the vehicle by wire; If the target controller is a designated controller of the vehicle-mounted system that needs to be upgraded in firmware, the step of obtaining benchmark verification information related to the firmware upgrade of the vehicle-mounted system includes: Obtaining the benchmark verification information stored at the target controller; If the target controller does not belong to the designated controller of the vehicle-mounted system that needs to perform firmware upgrade, the step of obtaining benchmark verification information related to the firmware upgrade of the vehicle-mounted system includes: Using the target controller to send a request for obtaining the benchmark verification information to the designated controller; The benchmark verification information fed back by the designated controller in response to the acquisition request is received.
10. The method according to claim 9, after performing integrity check processing on the firmware upgrade file and obtaining the integrity check result of the firmware upgrade file, further comprises: If the integrity check result indicates that the firmware upgrade file has passed the integrity check, and the target controller is a designated controller in the vehicle-mounted system that needs to be firmware upgraded, then the firmware upgrade file is written into a non-volatile memory in the target controller; If the integrity check result indicates that the firmware upgrade file has passed the integrity check and the target controller belongs to the designated controller in the vehicle system that requires firmware upgrade, the firmware upgrade file is sent to the designated controller; the designated controller is used to write the firmware upgrade file into the non-volatile memory at the designated controller.
11. A firmware integrity verification device, comprising: A first acquisition module is used to acquire a firmware upgrade file required for performing a firmware upgrade on the vehicle-mounted system; A determination module, used to determine the target verification information carried in the firmware upgrade file; The target verification information includes firmware upgrade data and firmware related attribute information; A second acquisition module, used to acquire benchmark verification information related to firmware upgrade at the vehicle-mounted system; The verification module is used to perform integrity verification processing on the firmware upgrade file based on the target verification information and the benchmark verification information to obtain an integrity verification result of the firmware upgrade file.
12. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
13. A vehicle controller, comprising: A processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 10.
14. A vehicle, comprising the firmware integrity checking device according to claim 11 or the vehicle controller according to claim 13.