Patch transmission and vulnerability repair method and system, storage medium and program product
Patent Information
- Application Number
- CN202510176005.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本申请实施例的目的在于提供一种补丁传输及漏洞修复方法、系统、存储介质、程序产品,用以解决相关技术存在着的,车辆的修复补丁在传输过程中容易泄露的问题
Smart Images

Figure CN122602148A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and more specifically, to a patch transmission and vulnerability repair method, system, storage medium, and program product. Background Technology
[0002] Vehicle-to-everything (V2X) technology refers to the technology that integrates sensors, communication modules, and computing platforms to enable vehicles to exchange information with other vehicles, infrastructure, pedestrians, and the cloud.
[0003] With the rapid development of information technology, vehicle-to-everything (V2X) technology has been widely applied in fields such as intelligent transportation and autonomous driving. However, the popularization of V2X has brought many security problems. For example, during the process of cloud platforms transmitting patch remediation data to vehicle systems to enable vulnerability repair, these patches are vulnerable to hacker attacks, leading to their leakage. Summary of the Invention
[0004] The purpose of this application is to provide a patch transmission and vulnerability repair method, system, storage medium, and program product to solve the problem that vehicle repair patches are easily leaked during transmission, which exists in related technologies.
[0005] This application provides a method for transmitting vehicle repair patches, applied to a cloud platform. A secure transmission tunnel is pre-established between the cloud platform and the vehicle terminal. The method includes: performing a vulnerability scan on the vehicle terminal; if a vulnerability is detected, obtaining a repair patch corresponding to the vulnerability; generating a session key and a dynamic key pair, the dynamic key pair including a public key and a private key; encrypting the repair patch using the session key in a trusted execution environment, and encrypting the session key using the public key to form a key encapsulation; and transmitting the key encapsulation, the encrypted repair patch, and the private key to the vehicle terminal through the secure transmission tunnel.
[0006] In the above implementation process, a session key is generated, and the patch is encrypted using this session key. A dynamic key pair is then generated, and within a trusted execution environment, the public key in the dynamic key pair is used to encrypt the session key, forming a key encapsulation. Finally, the key encapsulation, the encrypted patch, and the private key are transmitted to the vehicle terminal via the secure transmission tunnel. Since the cloud platform uses the session key to encrypt the patch within the trusted execution environment, the security of the session key is ensured, thereby guaranteeing the security of the patch. Furthermore, the secure transmission tunnel provides the first layer of security protection for the patch. However, since the vehicle terminal may switch between base stations during vehicle movement, the secure transmission tunnel may be interrupted, potentially exposing the patch. Nevertheless, encrypting the patch using the session key protects the patch even in exposed environments, further reducing the possibility of patch leakage.
[0007] Furthermore, transmitting the key encapsulation, encrypted repair patch, and private key to the vehicle terminal via the secure transmission tunnel includes:
[0008] Determine the network environment in which the vehicle terminal is located;
[0009] Determine the network connection scheme based on the network environment;
[0010] The network connection scheme enables the network connection between the cloud platform and the vehicle terminal, and the key encapsulation, encrypted repair patch and the private key are transmitted to the vehicle terminal through the secure transmission tunnel.
[0011] Because the network environment of the vehicle terminal may change during vehicle movement, the original network connection may be interrupted, leading to the failure of key encapsulation, encrypted patch, and private key transmission. In the above implementation scheme, a network connection scheme is determined based on the network environment of the vehicle terminal, and the network connection between the cloud platform and the vehicle terminal is established using this scheme. This allows the network connection between the cloud platform and the vehicle terminal to change as the network environment of the vehicle terminal changes, thus maintaining the network connection between the cloud platform and the vehicle and reducing the possibility that the vehicle terminal will fail to receive key encapsulation, encrypted patch, and private key due to network connection interruption.
[0012] Further, determining a network connection scheme based on the network environment includes:
[0013] If the network environment indicates that the vehicle terminal is within the coverage area of the roadside unit, then the network connection scheme is determined to be to realize the network connection between the cloud platform and the vehicle terminal through the roadside unit;
[0014] Correspondingly, the network connection between the cloud platform and the vehicle terminal is achieved through the network connection scheme, including:
[0015] The roadside unit enables network connectivity between the cloud platform and the vehicle terminal.
[0016] In the above implementation scheme, when the vehicle terminal is within the coverage area of the roadside unit, the network connection between the cloud platform and the vehicle terminal is achieved through the roadside unit. Since the roadside unit is a device installed on the roadside or road infrastructure, its installation location is fixed. Therefore, achieving the network connection between the cloud platform and the vehicle terminal through the roadside unit can improve the transmission efficiency of repair patches, enabling the vehicle terminal to receive repair patches even in complex network environments.
[0017] Further, determining a network connection scheme based on the network environment includes:
[0018] If the network environment indicates that the vehicle terminal is within the coverage area of the communication base station but not within the coverage area of the roadside unit, then the network connection scheme is determined to be to realize the network connection between the cloud platform and the vehicle terminal through the communication base station.
[0019] Correspondingly, the network connection between the cloud platform and the vehicle terminal is achieved through the network connection scheme, including:
[0020] The network connection between the cloud platform and the vehicle terminal is achieved through the communication base station.
[0021] In the above implementation scheme, when the vehicle terminal is within the coverage area of the communication base station but not within the coverage area of the roadside unit, the network connection between the cloud platform and the vehicle terminal is achieved through the communication base station. Since the network environment of the vehicle terminal changes during vehicle movement, such as when it leaves the coverage area of the roadside unit, and the coverage area of the communication base station is usually larger than that of the roadside unit, the vehicle terminal may still be within the coverage area of the communication base station even when it is not within the coverage area of the roadside unit. Therefore, using the communication base station to achieve the network connection between the cloud platform and the vehicle terminal in this case ensures data transmission between the cloud platform and the vehicle terminal.
[0022] Furthermore, after establishing a network connection between the cloud platform and the vehicle terminal via the communication base station, the method further includes:
[0023] If the current data transmission speed is detected to be lower than a preset speed threshold and WiFi is available, the network connection between the cloud platform and the vehicle terminal will be switched to WiFi.
[0024] In the above implementation scheme, when the network connection between the cloud platform and the vehicle terminal is established through a communication base station, if the current data transmission speed is detected to be lower than a preset speed threshold and WiFi is available, the network connection between the cloud platform and the vehicle terminal is switched to WiFi. Thus, when a decrease in the transmission rate of the communication base station is detected, the network connection between the cloud platform and the vehicle terminal is established via WiFi, thereby stabilizing the data transmission rate between the cloud platform and the vehicle terminal.
[0025] Furthermore, the patch is encrypted using the session key, including:
[0026] The repair patch is divided into blocks to obtain multiple repair patch blocks;
[0027] Each of the repair patch blocks is encrypted using the session key;
[0028] Correspondingly, the key encapsulation, encryption, and repair patch, along with the private key, are transmitted to the vehicle terminal through the secure transmission tunnel, including:
[0029] The key-encapsulated and encrypted patch blocks, along with the private key, are transmitted to the vehicle terminal via the secure transmission tunnel.
[0030] In the above implementation scheme, by dividing the patch into blocks, the size of each patch block is smaller than the size of the complete patch. Therefore, the network transmission resources occupied by each patch block are less than those occupied by the complete patch. This block-based transmission of the patch allows for transmission even in poor network conditions, reducing transmission latency. Furthermore, even if packet loss occurs during patch transmission, only the lost patch blocks need to be retransmitted, eliminating the need to retransmit the entire patch, thus improving transmission efficiency.
[0031] Furthermore, the method for transmitting vehicle repair patches also includes:
[0032] Upon receiving a data retransmission request from the vehicle terminal, an encrypted repair patch block corresponding to the data retransmission request is sent to the vehicle terminal.
[0033] In the above implementation scheme, by sending the encrypted repair patch block corresponding to the data retransmission request to the vehicle terminal, the data retransmission of the lost repair patch block can be realized, so that the vehicle terminal can receive all the repair patch blocks, and then use the repair patch blocks to splice together to obtain a complete repair patch, thereby realizing the use of repair patches to repair faults.
[0034] Furthermore, the secure transmission tunnel is a virtual private network tunnel based on the Secure Sockets Layer protocol or the Transport Layer Security protocol.
[0035] In the above implementation scheme, a virtual private network tunnel is constructed based on the Secure Sockets Layer (SSL) protocol or the Transport Layer Security (TLS) protocol. Thus, by transmitting the key encapsulation, encrypted patch, and private key to the vehicle terminal through the virtual private network tunnel, secure transmission of the key encapsulation, encrypted patch, and private key can be achieved.
[0036] Secondly, embodiments of this application provide a method for patching vulnerabilities in a vehicle, applied to a vehicle terminal, the method comprising:
[0037] The system receives a key encapsulation, an encrypted repair patch, and a private key transmitted by the cloud platform through a secure transmission tunnel. The encrypted repair patch is obtained by the cloud platform encrypting the patch using a session key, and the patch corresponds to a vulnerability in the vehicle terminal. Both the session key and the private key are generated by the cloud platform. The key encapsulation is obtained by the cloud platform encrypting the session key using a public key in a trusted execution environment. The public key is generated by the cloud platform and corresponds to the private key.
[0038] The private key is used to decrypt the key encapsulation to obtain the session key;
[0039] The encrypted repair patch is decrypted using the session key to obtain the repair patch;
[0040] Use the patch described above to fix the vulnerability.
[0041] Furthermore, the key encapsulation, encrypted repair patch, and private key transmitted by the cloud platform through the secure transmission tunnel include:
[0042] The cloud platform receives key-encapsulated and encrypted repair patch blocks and private keys transmitted through the secure transmission tunnel; each repair patch block is obtained by the cloud platform after dividing the repair patch into blocks.
[0043] Correspondingly, the encrypted repair patch is decrypted using the session key to obtain the repair patch, including:
[0044] The encrypted repair patch blocks are decrypted using the session key to obtain the repair patch blocks;
[0045] The repair patch is obtained by splicing the repair patch blocks according to their sequence numbers.
[0046] Further, before obtaining the repair patch by concatenating the repair patch blocks according to their sequence numbers, the process also includes:
[0047] Based on the sequence number of each repair patch block, determine whether any repair patch blocks constituting the repair patch are missing;
[0048] If a repair patch block constituting the repair patch is missing, a data retransmission request is sent to the cloud platform, triggering the cloud platform to retransmit the missing repair patch block through a secure transmission tunnel.
[0049] Furthermore, the vulnerability is fixed using the patch, including:
[0050] When the vehicle terminal is in an idle state, the vulnerability is fixed using the patch.
[0051] Thirdly, embodiments of this application provide a vehicle vulnerability repair system, including a cloud platform and a vehicle terminal, wherein a secure transmission tunnel is preset between the cloud platform and the vehicle terminal;
[0052] The cloud platform is configured to perform vulnerability scanning on the vehicle terminal, and if a vulnerability is detected, obtain a patch corresponding to the vulnerability; generate a dynamic key pair and a session key; encrypt the patch using the session key in a trusted execution environment, and encrypt the session key using the public key to form a key encapsulation; and transmit the key encapsulation, the encrypted patch, and the private key to the vehicle terminal through the secure transmission tunnel.
[0053] The vehicle terminal is configured to decrypt the key encapsulation using the received private key to obtain a session key; decrypt the encrypted patch using the session key to obtain the patch; and use the patch to fix the vulnerability.
[0054] Furthermore, the cloud platform is specifically configured to determine the network environment of the vehicle terminal, determine a network connection scheme based on the network environment, realize the network connection between the cloud platform and the vehicle terminal through the network connection scheme, and transmit the key-encapsulated, encrypted repair patch and the private key to the vehicle terminal through the secure transmission tunnel.
[0055] Furthermore, the cloud platform is specifically configured to, when the network environment indicates that the vehicle terminal is within the coverage area of the roadside unit, determine that the network connection scheme is to realize the network connection between the cloud platform and the vehicle terminal through the roadside unit, and to realize the network connection between the cloud platform and the vehicle terminal through the roadside unit.
[0056] Furthermore, the cloud platform is specifically configured to, when the network environment indicates that the vehicle terminal is within the coverage area of the communication base station but not within the coverage area of the roadside unit, determine that the network connection scheme is to realize the network connection between the cloud platform and the vehicle terminal through the communication base station; and realize the network connection between the cloud platform and the vehicle terminal through the communication base station.
[0057] Furthermore, after establishing a network connection between the cloud platform and the vehicle terminal through the communication base station, the cloud platform is also configured to switch to establishing a network connection between the cloud platform and the vehicle terminal through the WiFi if it detects that the current data transmission speed is lower than a preset speed threshold and WiFi is currently available.
[0058] Furthermore, the cloud platform is specifically configured to process the repair patch in blocks to obtain multiple repair patch blocks; encrypt each repair patch block using the session key; and transmit the key-encapsulated and encrypted repair patch blocks and the private key to the vehicle terminal through the secure transmission tunnel.
[0059] Correspondingly, the vehicle terminal is specifically configured to decrypt each of the encrypted repair patch blocks using the session key to obtain the repair patch block; and to concatenate each of the repair patch blocks according to their sequence numbers to obtain the repair patch.
[0060] Furthermore, the vehicle terminal is also configured to determine whether any repair patch blocks constituting the repair patch are missing based on the sequence number of each repair patch block; and to send a data retransmission request to the cloud platform if any repair patch blocks constituting the repair patch are missing.
[0061] The cloud platform is also configured to send the encrypted repair patch block corresponding to the data retransmission request to the vehicle terminal.
[0062] Fourthly, embodiments of this application provide a storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the vehicle repair patch transmission method described in the first aspect or the vehicle vulnerability repair method described in the second aspect.
[0063] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the vehicle repair patch transmission method described in the first aspect or the vehicle vulnerability repair method described in the second aspect. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 A schematic diagram of the structure of a vehicle vulnerability repair system provided in an embodiment of this application;
[0066] Figure 2 A schematic diagram of another vehicle vulnerability repair system provided in this application embodiment;
[0067] Figure 3 This is a schematic diagram illustrating a scenario where a vehicle terminal is only within the coverage area of a roadside unit but not within the coverage area of a communication base station, as provided in an embodiment of this application.
[0068] Figure 4 This is a schematic diagram illustrating a scenario where a vehicle terminal, as provided in an embodiment of this application, is not only within the coverage area of a roadside unit but also within the coverage area of a communication base station.
[0069] Figure 5 This is a schematic diagram illustrating a scenario where a vehicle terminal is within the coverage area of a communication base station but not within the coverage area of a roadside unit, as provided in an embodiment of this application.
[0070] Figure 6 A schematic flowchart illustrating a vehicle patch transmission and vulnerability repair method provided in this application embodiment;
[0071] Figure 7 A flowchart illustrating another vehicle patch transmission and vulnerability repair method provided in this application embodiment;
[0072] Figure 8 This is a flowchart illustrating another vehicle patch transmission and vulnerability repair method provided in this application embodiment. Detailed Implementation
[0073] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0074] Example 1:
[0075] To address the issue of vehicle patch leaks during transmission, this application provides a vehicle vulnerability repair system 100, which can be found in the following embodiments. Figure 1 As shown, the vehicle vulnerability repair system 100 includes a cloud platform 1 and a vehicle terminal 2, with a pre-set secure transmission tunnel between the cloud platform 1 and the vehicle terminal 2.
[0076] The cloud platform 1 is configured to perform vulnerability scanning on the vehicle terminal 2. If a vulnerability is detected, it obtains the corresponding patch; generates a dynamic key pair and a session key; encrypts the patch using the session key in a trusted execution environment and encrypts the session key using the public key to form a key encapsulation; and transmits the key encapsulation, the encrypted patch, and the private key to the vehicle terminal 2 through a secure transmission tunnel.
[0077] Cloud Platform 1 can perform vulnerability scanning on vehicle terminals using vulnerability scanning tools. Examples of such tools include OWASP ZAP (Open Web Application Security Project Zed Attack Proxy). OWASP ZAP can detect risks of unvalidated remote command execution, i.e., remote code execution. OWASP ZAP can identify database attack risks due to missing parameterized queries, i.e., malicious SQL injection. OWASP ZAP can locate unescaped HTML vulnerabilities, i.e., cross-site scripting attacks. OWASP ZAP can check for insecure HTTP header configurations, such as missing X-Frame-Options, i.e., vulnerable configurations.
[0078] Vehicle terminal 2 is configured to use the received private key to decrypt the key encapsulation to obtain the session key; use the session key to decrypt the encrypted patch to obtain the patch; and use the patch to fix the vulnerability.
[0079] Vehicle terminal 2 may include an in-vehicle central control platform, electronic management system, etc. The in-vehicle central control platform is the vehicle's in-vehicle infotainment system or driver assistance system, capable of connecting to other devices such as navigation and cameras. The electronic management system refers to an integrated electronic system used to monitor, control, and optimize various functions of the vehicle. Examples include engine management system and brake control system. The engine management system controls the operation of the engine. The brake control system monitors vehicle dynamics and automatically adjusts engine power and braking force at each wheel to stabilize the vehicle's posture and prevent skidding or loss of control.
[0080] Optionally, combined Figure 2 As shown, the vehicle's vulnerability repair system may also include a roadside unit 3 and a communication base station 4.
[0081] When the vehicle terminal is within the coverage area of the roadside unit, a network connection between the cloud platform and the vehicle terminal can be established through the roadside unit. For example, if the location relationship between the vehicle terminal and the roadside unit is as follows... Figure 3 or Figure 4 As shown, network connectivity between the cloud platform and vehicle terminals can be achieved through roadside units. Figure 3 This is a schematic diagram of a scenario where the vehicle terminal is only within the coverage area of the roadside unit, but not within the coverage area of the communication base station. Figure 4 This diagram illustrates a scenario where a vehicle terminal is within the coverage area of both a roadside unit and a communication base station. By deploying roadside units, commonly used patching services can be pre-stored within them. When a vehicle enters the coverage area of a roadside unit, the vehicle terminal can directly obtain the patching service from it, thereby improving the response speed and distribution efficiency of patching services.
[0082] When the vehicle terminal is within the coverage area of the communication base station but not within the coverage area of the roadside unit, a network connection between the cloud platform and the vehicle terminal can be established through the communication base station. For example, if the location relationship between the vehicle terminal and the communication base station is as follows... Figure 5 As shown, network connection between the cloud platform and the vehicle terminal can be achieved through a communication base station. Figure 5 This is a schematic diagram illustrating a scenario where the vehicle terminal is within the coverage area of a communication base station but not within the coverage area of a roadside unit.
[0083] Optionally, after establishing a network connection between the cloud platform and the vehicle terminal via a communication base station, if the current data transmission speed is detected to be lower than a preset speed threshold, and WiFi (Wireless Fidelity) is currently available, the connection between the cloud platform and the vehicle terminal can be switched to WiFi.
[0084] Because the network connection method between the vehicle terminal and the cloud platform can automatically switch according to the network environment in which the vehicle terminal is located, the network connection between the vehicle terminal and the cloud platform is always adapted to the network environment in which the vehicle terminal is located. This ensures efficient and stable transmission of patch data, allowing patch data to be transmitted even when the vehicle terminal is in different network environments.
[0085] For example, the communication base station can be a fifth-generation mobile communication base station or a fourth-generation mobile communication base station. When the communication base station includes both fifth-generation and fourth-generation base stations, if the vehicle terminal is within the coverage area of a fifth-generation base station, network connectivity between the vehicle terminal and the cloud platform can be achieved through the fifth-generation base station, regardless of whether the vehicle terminal is within the coverage area of a fourth-generation base station.
[0086] Similarly, after establishing a network connection between the vehicle terminal and the cloud platform via a fifth-generation communication base station, if the current data transmission speed is detected to be lower than a preset speed threshold and the vehicle terminal is within the coverage area of a fourth-generation mobile communication base station, the network connection between the vehicle terminal and the cloud platform can be switched to a fourth-generation communication base station regardless of whether WiFi is currently available.
[0087] Similarly, after establishing a network connection between the vehicle terminal and the cloud platform via a fourth-generation communication base station, if the current data transmission speed is detected to be lower than a preset speed threshold and WiFi is available, the network connection between the vehicle terminal and the cloud platform can be switched to WiFi.
[0088] Of course, after establishing a network connection between the vehicle terminal and the cloud platform through a fifth-generation communication base station, if the current data transmission speed is detected to be lower than a preset speed threshold and WiFi is available, the network connection between the vehicle terminal and the cloud platform can be switched to WiFi.
[0089] Optionally, the cloud platform can be configured to process the patch in blocks, obtaining multiple patch blocks; encrypt each patch block using a session key; and transmit the key-encapsulated and encrypted patch blocks, along with the private key, to the vehicle terminal via a secure transmission tunnel. Correspondingly, the vehicle terminal can be configured to decrypt each encrypted patch block using the session key, obtaining a patch block; and concatenate the patch blocks according to their sequence numbers to obtain the patch. This block processing ensures that each patch block is smaller than the complete patch, thus reducing network transmission resources required by each patch block compared to the complete patch. This block-based transmission allows for patch block transmission even in poor network conditions, reducing transmission latency. Furthermore, even if packet loss occurs during patch block transmission, only the lost patch blocks need to be retransmitted, eliminating the need to retransmit the entire patch, thereby improving transmission efficiency.
[0090] The vehicle vulnerability patching system provided in this application generates a session key through a cloud platform, encrypts the patch using the session key, generates a dynamic key pair, and then encrypts the session key using the public key in the dynamic key pair in a trusted execution environment to form a key encapsulation. Finally, the key encapsulation, the encrypted patch, and the private key are transmitted to the vehicle terminal through a secure transmission tunnel. Since the cloud platform uses the session key to encrypt the patch in a trusted execution environment, the security of the session key is ensured, thereby protecting the security of the patch. Furthermore, the cloud platform uses a secure transmission tunnel to transmit the key encapsulation, the encrypted patch, and the private key to the vehicle terminal, thus achieving a first layer of security protection for the patch. Additionally, since the vehicle terminal may switch between base stations during vehicle movement, the secure transmission tunnel may be interrupted, potentially exposing the patch. However, because the patch is encrypted using the session key, it is protected even in exposed environments, further reducing the possibility of patch leakage.
[0091] Example 2
[0092] Combination Figure 6 As shown in the diagram, this application provides a flowchart of a vehicle patch transmission and vulnerability repair method, applied to the vehicle vulnerability repair system of Embodiment 1. The vehicle patch transmission and vulnerability repair method may include the following steps:
[0093] Step S101: The cloud platform performs a vulnerability scan on the vehicle terminal.
[0094] Step S102: If a vulnerability is detected, the cloud platform obtains the corresponding patch.
[0095] In one optional implementation of this application, the cloud platform can select a patch corresponding to the vulnerability type from the local database and determine whether the patch version is compatible with the vehicle terminal. If the patch version is compatible with the vehicle terminal, then the patch is identified as the patch corresponding to the vulnerability. If the patch version is incompatible with the vehicle terminal, then the patch corresponding to the vulnerability can be obtained from the cloud database. Both the local database and the cloud database store the correspondence between patches and vulnerability types. Furthermore, the number of correspondences between patches and vulnerability types stored in the cloud database is greater than the number of correspondences between patches and vulnerability types stored in the local database.
[0096] For example, it can be determined whether the version number of the patch is the same as the version number of the vehicle terminal. If the version number of the patch is the same as the version number of the vehicle terminal, it can be determined that the patch version is compatible with the vehicle terminal. If the version number of the patch is different from the version number of the vehicle terminal, it can be determined that the patch version is incompatible with the vehicle terminal.
[0097] In another optional implementation of this application's embodiments, the cloud platform can quickly filter suitable patch templates using a rule engine and perform preliminary matching based on vulnerability characteristics. Vulnerability characteristics include, for example, vulnerability type and vulnerability number. If the rule engine cannot determine the best patch, the cloud platform can call an integrated large model to analyze the semantic matching degree between the vulnerability description and patch characteristics, and assess the patch's applicability. If the match is successful, meaning the current patch is suitable for vulnerability repair, a patch file is directly generated. If the match fails, meaning the current patch is not suitable for vulnerability repair, the large model can be called to retrieve feasible alternative patches from a preset patch library or an open-source vulnerability database, and a repair solution can be recommended. Open-source vulnerability databases include, for example, CVE (Common Vulnerabilities and Exposures) and GitHub.
[0098] Step S103: The cloud platform generates a dynamic key pair and a session key.
[0099] In one optional implementation of this application embodiment, the cloud platform can generate a dynamic key pair in the following way: The cloud platform can obtain a dynamic factor and its hash value, and then use the value at a preset position in the hash value of the dynamic factor as the private key. Then, a preset ECC (Elliptic Curve Cryptography) algorithm can be used with the private key to calculate and obtain the public key. For example, the dynamic factor can be a timestamp or a device identifier of the vehicle terminal. The timestamp can be the current timestamp or the timestamp when the cloud platform performs vulnerability detection on the vehicle terminal.
[0100] Optionally, the cloud platform can use a pseudo-random number generator to generate the session key, or it can generate the session key based on a dynamic factor. For example, the cloud platform can directly use the dynamic factor as the session key, or it can use the hash value of the dynamic factor as the dynamic key.
[0101] In step S104, the cloud platform encrypts the repair patch using a session key in a trusted execution environment, and encrypts the session key using a public key to form a key encapsulation.
[0102] Optionally, the cloud platform can directly encrypt the patch using a session key. Alternatively, the cloud platform can divide the patch into multiple patch blocks and then encrypt each patch block separately using a session key.
[0103] For example, a 15MB patch can be divided into 10 1.5MB data blocks, i.e., patch blocks, and each patch block data is encrypted separately using AES-256.
[0104] To enable the vehicle terminal to concatenate multiple repair patch blocks upon receiving them to obtain a complete repair patch, each repair patch block can be sorted and its sequence number determined before encryption using the session key. Similarly, after encryption using the session key, the encrypted repair patch blocks can be sorted and their sequence numbers determined. This allows the vehicle terminal to concatenate multiple received repair patch blocks according to their sequence numbers and determine whether any received repair patch blocks are missing.
[0105] In step S105, the cloud platform transmits the key encapsulation, encrypted repair patch, and private key to the vehicle terminal through a secure transmission tunnel.
[0106] For example, the cloud platform can determine the network environment of the vehicle terminal and determine the network connection scheme based on the network environment; realize the network connection between the cloud platform and the vehicle terminal through the network connection scheme, and transmit the key encapsulation, encrypted repair patch and private key to the vehicle terminal through a secure transmission tunnel.
[0107] In one optional implementation of this application embodiment, if the network environment indicates that the vehicle terminal is within the coverage area of the roadside unit, then the network connection scheme is determined to be to achieve network connection between the cloud platform and the vehicle terminal through the roadside unit. Correspondingly, achieving network connection between the cloud platform and the vehicle terminal through the network connection scheme includes: achieving network connection between the cloud platform and the vehicle terminal through the roadside unit.
[0108] For example, in combination Figure 7 As shown, when the network connection between the cloud platform and the vehicle terminal is achieved through the roadside unit, the above step S105 can also be replaced by the following step:
[0109] In step S201, the cloud platform transmits the key encapsulation, encrypted repair patch, and private key to the roadside unit through a secure transmission tunnel.
[0110] For example, regardless of whether the same version of the patch already exists in the roadside unit, the cloud platform can transmit the key-encapsulated, encrypted patch, and private key to the roadside unit. If the same version of the patch already exists in the roadside unit, the cloud platform may choose not to transmit the key-encapsulated, encrypted patch, and private key to the roadside unit. The cloud platform can also update the patch stored in the roadside unit at set time intervals using the mapping between patches and vulnerability types stored in its local database.
[0111] In step S202, the roadside unit transmits the key encapsulation, the encrypted repair patch, and the private key to the vehicle terminal.
[0112] For example, upon receiving a vulnerability patching instruction from the vehicle terminal, the roadside unit can transmit the encapsulated key, the encrypted patch, and the private key to the vehicle terminal.
[0113] In another optional implementation of this application embodiment, if the network environment indicates that the vehicle terminal is within the coverage area of the communication base station but not within the coverage area of the roadside unit, then the network connection scheme is determined to be to achieve network connection between the cloud platform and the vehicle terminal through the communication base station. Correspondingly, achieving network connection between the cloud platform and the vehicle terminal through the network connection scheme includes: achieving network connection between the cloud platform and the vehicle terminal through the communication base station.
[0114] For example, in combination Figure 8 As shown, when the network connection between the cloud platform and the vehicle terminal is achieved through a communication base station, the above step S105 can also be replaced by the following steps:
[0115] In step S301, the cloud platform transmits the key encapsulation, encrypted repair patch, and private key to the communication base station through a secure transmission tunnel.
[0116] In step S302, the communication base station transmits the key encapsulation, the encrypted repair patch, and the private key to the vehicle terminal.
[0117] If the cloud platform encrypts the entire patch, it can transmit the encrypted patch to the vehicle terminal via a secure tunnel. Alternatively, if the cloud platform divides the patch into blocks and encrypts each block, it can transmit the encrypted blocks to the vehicle terminal via a secure tunnel. The cloud platform can transmit multiple patch blocks in parallel or sequentially. This allows for retransmission of patch blocks even if transmission fails or is interrupted, improving system fault tolerance.
[0118] In step S106, the vehicle terminal uses its private key to decrypt the key encapsulation and obtain the session key.
[0119] In step S107, the vehicle terminal uses the session key to decrypt the encrypted repair patch and obtain the repair patch.
[0120] The vehicle terminal can receive the key encapsulation, encrypted repair patch, and private key in real time via the lightweight MQTT (Message Queuing Telemetry Transport) protocol. After decrypting the repair patch, it stores it in a temporary cache.
[0121] Optionally, if the encrypted patch is obtained by encrypting the entire patch through the cloud platform, the vehicle terminal can decrypt the encrypted patch using the session key to obtain the complete patch. If the encrypted patch is obtained by the cloud platform dividing the patch into blocks and encrypting each block separately, the vehicle terminal can decrypt each encrypted block separately using the session key to obtain multiple patch blocks, and then concatenate these multiple blocks to obtain the complete patch.
[0122] The vehicle terminal decrypts each encrypted repair patch block, obtaining multiple repair patch blocks. It can then determine whether any repair patch blocks constituting the repair patch are missing based on their sequence numbers. If any repair patch blocks constituting the repair patch are missing, a data retransmission request is sent to the cloud platform. Correspondingly, upon receiving the data retransmission request, the cloud platform can send the encrypted repair patch block corresponding to the data retransmission request to the vehicle terminal.
[0123] Step S108: The vehicle terminal uses the patch to fix the vulnerability.
[0124] The vehicle terminal can use patches to fix vulnerabilities while in an idle state. An idle state indicates that the vehicle terminal is not currently performing data transmission tasks.
[0125] After the vehicle terminal uses the patch to fix the vulnerability, it can send the patch status to the cloud platform. The patch status indicates whether the vulnerability was successfully patched or not.
[0126] Upon receiving a remediation status, the cloud platform can perform another vulnerability scan on the vehicle terminal to determine if the vulnerability remediation result matches the remediation status. If the remediation result matches the remediation status, a remediation report is generated, including the vulnerability number and the remediation result. The cloud platform can also upload the remediation report to the fleet management system for storage, allowing users to retrieve the vehicle terminal's remediation report from the fleet management system.
[0127] The vehicle patch transmission and vulnerability repair method provided in this application involves generating a session key on a cloud platform, encrypting the patch using the session key, generating a dynamic key pair, and then encrypting the session key using the public key in the dynamic key pair in a trusted execution environment to form a key encapsulation. Finally, the key encapsulation, the encrypted patch, and the private key are transmitted to the vehicle terminal via a secure transmission tunnel. Since the cloud platform uses the session key to encrypt the patch in a trusted execution environment, the security of the session key is ensured, thereby guaranteeing the security of the patch. Furthermore, the secure transmission tunnel provides a first layer of security protection for the patch. Additionally, since the vehicle terminal may switch between base stations during vehicle movement, the secure transmission tunnel may be interrupted, potentially exposing the patch. However, by encrypting the patch using the session key, the patch is protected even in exposed environments, further reducing the possibility of patch leakage.
[0128] Example 3
[0129] This embodiment provides further examples and explanations of the present application based on the above embodiments.
[0130] The vehicle terminal establishes a virtual private network tunnel with the cloud platform via a virtual private network tunnel client, based on a Secure Sockets Layer (SSL) protocol or a Transport Layer Security (TLS) protocol. The cloud platform uses OWASP ZAP to scan vehicle terminal A for vulnerabilities and detects vulnerability C. Vulnerability C is a remote code execution vulnerability. The cloud platform marks vulnerability C and uploads it to the vulnerability management system. Utilizing the vulnerability type of vulnerability C (remote code execution), the cloud platform performs a matching operation in its local database to obtain the corresponding patch, which is 15MB in size. The cloud platform can also determine whether the version number of the patch for the remote code execution vulnerability is the same as the version number of the vehicle terminal. For example, if the version number of the patch for the remote code execution vulnerability is W1, and the version number of the vehicle terminal is also W1, this confirms that the version number of the patch matches the version number of the vehicle terminal. Simultaneously, the cloud platform can obtain the current timestamp, for example, 1738832448. The cloud platform performs a hash calculation on the current timestamp 1738832448 using the SHA-256 hash function, obtaining the hash value "e1b9d5f0a2c3e4b5a6f7e8d9c0b1a2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9". The cloud platform can then select a value at a preset position from the hash value of the current timestamp as its private key. For example, the private key could be 7e8d9c0b1a2c3d4e5f. The cloud platform can then use the ECC algorithm and the private key "7e8d9c0b1a2c3d4e5f" to calculate the public key. Furthermore, the cloud platform can use a pseudo-random number generator to generate a 256-bit session key, and then encrypt the session key using the public key to obtain the key encapsulation. The cloud platform can also divide the 15MB patch into 10 blocks, each 1.5MB in size. Furthermore, the cloud platform can encrypt each patch block using AES encryption and a 256-bit session key. Finally, the cloud platform transmits the key-encapsulated, encrypted patch blocks and the private key to the roadside unit via a virtual private network tunnel. Upon receiving a vulnerability remediation command from the vehicle terminal, the roadside unit can transmit the key-encapsulated, encrypted patch blocks and the private key to the vehicle terminal, enabling the vehicle terminal to obtain the patch for vulnerability remediation.
[0131] Furthermore, the cloud platform can monitor the progress of vulnerability patching in real time and record the patch delivery and patching process for vehicles via blockchain. Because blockchain technology ensures the immutability of information and the traceability of the patching process, administrators can view the patching status and detailed historical records of vehicle terminals at any time through the blockchain records.
[0132] Based on the same inventive concept, this embodiment also provides a computer-readable storage medium, such as a floppy disk, optical disk, hard disk, flash memory, USB flash drive, SD (Secure Digital Memory Card), MMC (Multimedia Card), etc. This computer-readable storage medium stores one or more programs that implement the above-described steps. These one or more programs can be executed by one or more processors to implement the above-described vehicle repair patch transmission method or the above-described vehicle vulnerability repair method. Further details will not be elaborated here.
[0133] Based on the same inventive concept, this embodiment also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described vehicle repair patch transmission method or the above-described vehicle vulnerability repair method.
[0134] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0135] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0136] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0137] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0138] In this article, "multiple" refers to two or more.
[0139] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for transmitting vehicle repair patches, characterized in that, Applied to a cloud platform, wherein a secure transmission tunnel is pre-established between the cloud platform and the vehicle terminal, the method includes: Perform vulnerability scanning on the vehicle terminal, and if vulnerabilities are detected, obtain the corresponding patch. Generate a session key and a dynamic key pair, wherein the dynamic key pair includes a public key and a private key; The patch is encrypted using the session key in a trusted execution environment, and the session key is encrypted using the public key to form a key encapsulation; The key encapsulation, encrypted repair patch, and private key are transmitted to the vehicle terminal through the secure transmission tunnel.
2. The method according to claim 1, characterized in that, The secure transmission tunnel transmits the encapsulated and encrypted repair patch and the private key to the vehicle terminal, including: Determine the network environment in which the vehicle terminal is located; Determine the network connection scheme based on the network environment; The network connection scheme enables the network connection between the cloud platform and the vehicle terminal, and the key encapsulation, encrypted repair patch and the private key are transmitted to the vehicle terminal through the secure transmission tunnel.
3. The method according to claim 2, characterized in that, Determining a network connection scheme based on the network environment includes: If the network environment indicates that the vehicle terminal is within the coverage area of the roadside unit, then the network connection scheme is determined to be to realize the network connection between the cloud platform and the vehicle terminal through the roadside unit; Correspondingly, the network connection between the cloud platform and the vehicle terminal is achieved through the network connection scheme, including: The roadside unit enables network connectivity between the cloud platform and the vehicle terminal.
4. The method according to claim 2, characterized in that, Determining a network connection scheme based on the network environment includes: If the network environment indicates that the vehicle terminal is within the coverage area of the communication base station but not within the coverage area of the roadside unit, then the network connection scheme is determined to be to realize the network connection between the cloud platform and the vehicle terminal through the communication base station. Correspondingly, the network connection between the cloud platform and the vehicle terminal is achieved through the network connection scheme, including: The network connection between the cloud platform and the vehicle terminal is achieved through the communication base station.
5. The method according to claim 4, characterized in that, After establishing a network connection between the cloud platform and the vehicle terminal via the communication base station, the method further includes: If the current data transmission speed is detected to be lower than a preset speed threshold and WiFi is available, the network connection between the cloud platform and the vehicle terminal will be switched to WiFi.
6. The method according to claim 1, characterized in that, Encrypting the patch using the session key includes: The repair patch is divided into blocks to obtain multiple repair patch blocks; Each of the repair patch blocks is encrypted using the session key; Correspondingly, the key encapsulation, encryption, and repair patch, along with the private key, are transmitted to the vehicle terminal through the secure transmission tunnel, including: The key-encapsulated and encrypted patch blocks, along with the private key, are transmitted to the vehicle terminal via the secure transmission tunnel.
7. The method according to claim 6, characterized in that, The method further includes: Upon receiving a data retransmission request from the vehicle terminal, an encrypted repair patch block corresponding to the data retransmission request is sent to the vehicle terminal.
8. The method according to any one of claims 1 to 7, characterized in that, The secure transmission tunnel is a virtual private network tunnel based on the Secure Sockets Layer protocol or transport layer security protocol.
9. A method for fixing vulnerabilities in a vehicle, characterized in that, Applied to a vehicle terminal, the method includes: The system receives a key encapsulation, an encrypted repair patch, and a private key transmitted by the cloud platform through a secure transmission tunnel. The encrypted repair patch is obtained by the cloud platform encrypting the patch using a session key, and the patch corresponds to a vulnerability in the vehicle terminal. Both the session key and the private key are generated by the cloud platform. The key encapsulation is obtained by the cloud platform encrypting the session key using a public key in a trusted execution environment. The public key is generated by the cloud platform and corresponds to the private key. The private key is used to decrypt the key encapsulation to obtain the session key; The encrypted repair patch is decrypted using the session key to obtain the repair patch; Use the patch described above to fix the vulnerability.
10. The method according to claim 9, characterized in that, The key encapsulation, encrypted repair patch, and private key transmitted by the cloud platform through the secure transmission tunnel include: The cloud platform receives key-encapsulated and encrypted repair patch blocks and private keys transmitted through the secure transmission tunnel; each repair patch block is obtained by the cloud platform after dividing the repair patch into blocks. Correspondingly, the encrypted repair patch is decrypted using the session key to obtain the repair patch, including: The encrypted repair patch blocks are decrypted using the session key to obtain the repair patch blocks; The repair patch is obtained by splicing the repair patch blocks according to their sequence numbers.
11. The method according to claim 10, characterized in that, Before obtaining the repair patch by concatenating the repair patch blocks according to their sequence numbers, the process further includes: Based on the sequence number of each repair patch block, determine whether any repair patch blocks constituting the repair patch are missing; If a repair patch block constituting the repair patch is missing, a data retransmission request is sent to the cloud platform, triggering the cloud platform to retransmit the missing repair patch block through a secure transmission tunnel.
12. The method according to claim 9, characterized in that, The vulnerability is fixed using the patch, including: When the vehicle terminal is in an idle state, the vulnerability is fixed using the patch.
13. A vehicle vulnerability repair system, characterized in that, It includes a cloud platform and a vehicle terminal, and a secure transmission tunnel is pre-set between the cloud platform and the vehicle terminal; The cloud platform is configured to perform vulnerability scanning on the vehicle terminal, and if a vulnerability is detected, obtain the corresponding patch. Generate dynamic key pairs and session keys; The patch is encrypted using the session key in a trusted execution environment, and the session key is encrypted using the public key to form a key encapsulation; The key encapsulation, encrypted repair patch, and private key are transmitted to the vehicle terminal through the secure transmission tunnel. The vehicle terminal is configured to decrypt the key encapsulation using the received private key to obtain a session key; The encrypted repair patch is decrypted using the session key to obtain the repair patch; Use the patch described above to fix the vulnerability.
14. The system according to claim 13, characterized in that, The cloud platform is specifically configured to determine the network environment of the vehicle terminal, determine a network connection scheme based on the network environment, realize the network connection between the cloud platform and the vehicle terminal through the network connection scheme, and transmit the key-encapsulated, encrypted repair patch and the private key to the vehicle terminal through the secure transmission tunnel.
15. The system according to claim 14, characterized in that, Specifically, the cloud platform is configured to determine, when the network environment indicates that the vehicle terminal is within the coverage area of the roadside unit, that the network connection scheme is to realize the network connection between the cloud platform and the vehicle terminal through the roadside unit, and to realize the network connection between the cloud platform and the vehicle terminal through the roadside unit.
16. The system according to claim 14, characterized in that, Specifically, the cloud platform is configured to determine, when the network environment indicates that the vehicle terminal is within the coverage area of a communication base station but not within the coverage area of a roadside unit, that the network connection scheme is to achieve a network connection between the cloud platform and the vehicle terminal through the communication base station; and to achieve a network connection between the cloud platform and the vehicle terminal through the communication base station.
17. The system according to claim 16, characterized in that, After establishing a network connection between the cloud platform and the vehicle terminal via the communication base station, the cloud platform is further configured to switch to establishing a network connection between the cloud platform and the vehicle terminal via WiFi if it detects that the current data transmission speed is lower than a preset speed threshold and WiFi is currently available.
18. The system according to claim 13, characterized in that, The cloud platform is specifically configured to process the repair patch in blocks to obtain multiple repair patch blocks; and to encrypt each repair patch block using the session key. The key-encapsulated and encrypted repair patch blocks, along with the private key, are transmitted to the vehicle terminal through the secure transmission tunnel. Correspondingly, the vehicle terminal is specifically configured to decrypt each of the encrypted repair patch blocks using the session key to obtain the repair patch block; and to concatenate each of the repair patch blocks according to their sequence numbers to obtain the repair patch.
19. The system according to claim 18, characterized in that, The vehicle terminal is also configured to determine whether any repair patch blocks constituting the repair patch are missing based on the sequence number of each repair patch block; and to send a data retransmission request to the cloud platform if any repair patch blocks constituting the repair patch are missing. The cloud platform is also configured to send the encrypted repair patch block corresponding to the data retransmission request to the vehicle terminal.
20. A storage medium, characterized in that, The storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the vehicle patch transmission method according to any one of claims 1 to 8 or the vehicle vulnerability repair method according to any one of claims 9 to 12.
21. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the vehicle repair patch transmission method according to any one of claims 1 to 8 or the vehicle vulnerability repair method according to any one of claims 9 to 12.