A method for BMC to securely update server BIOS firmware
By deploying AI algorithm models in the BMC system, judging the status of the flash chip and verifying it during the update process, the problem of insufficient security in the server BIOS firmware update is solved, and a smarter, safer and more efficient update process is achieved to ensure the system It can start normally after update.
Patent Information
- Application Number
- CN202411225182.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The existing server BIOS firmware update methods lack security, and unexpected power outages or interrupts are prone to occur during the update process, resulting in the system being unable to start, and may even cause permanent damage, and lack intelligence and efficiency.
Deploy AI algorithm models in the BMC system, train the model through the read and write data of the historical flash chip, judge whether the flash chip is abnormal, and verify it during each update process to ensure the security of the BIOS firmware; during the update process, the update process is In case of an accident, use a risk management program to ensure that the system can start normally.
Automatically judge the status of the flash chip through AI, ensuring the security of each step of update, avoiding security problems during the update process, increasing the server's risk resistance, and ensuring that the system can start normally after the update.
Smart Images

Figure CN118733091B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of BMC firmware update, and in particular relates to a method for BMC to safely update server BIOS firmware. Background Art
[0002] The BIOS firmware of a server is the first code that runs when the server is powered on. Its main functions include the following aspects: Boot system: responsible for self-checking and initialization when the computer is turned on, loading the operating system into the memory and starting the system. Hardware initialization: manage and initialize the computer's hardware devices, including the processor, memory, hard disk, graphics card, etc., to ensure that they can work properly.
[0003] Provide system services: Provide some basic system services, such as keyboard and display control. Power management: Responsible for managing the computer's power switch and sleep state. System settings and configuration: Provide a user interface to allow users to set up and configure the system, such as setting the boot sequence, adjusting hardware settings, etc. The effective operation of the server BIOS is crucial to the normal operation of the server. It ensures that the hardware can be initialized and work correctly, and provides the necessary conditions for the loading and operation of the operating system. When there is a problem with the BIOS firmware, the server cannot enter the system normally. Therefore, when the user needs to update the server BIOS firmware, it is necessary to ensure the security of the firmware update method, otherwise the updated BIOS firmware will not be able to start the server system normally.
[0004] At present, most of the remote updates of server BIOS firmware in the market are implemented through BMC. Different manufacturers have different methods for updating BIOS, but they all use BMC to operate the flash chip that loads BIOS to update BIOS firmware. Therefore, how to make BMC safely operate the flash chip that loads BIOS is something that every manufacturer must consider to make the server more secure and reliable.
[0005] The commonly used openbmc has the following steps for updating the BIOS firmware: 1. Get the correct firmware version: Make sure you get the correct BIOS firmware update file, which is usually provided by the server manufacturer. 2. Log in to penBMC: Use SSH or other methods to log in to the OpenBMC server. 3. Check the current firmware version: Use commands or the Web interface to view the BIOS firmware version of the current server to check whether it needs to be updated. 4. Upload the firmware file: Upload the new BIOS firmware file to the server. You can use scp or similar tools for file transfer. 5. Execute the update command: Use the tools or commands provided by OpenBMC, such as flashcp, to execute the firmware update command to write the newly uploaded firmware to the flash chip that loads the BIOS. 6. Wait for the firmware update to complete: The firmware update process may take some time. Do not interrupt the server power or network connection during the waiting process. 7. Verify the update: After the update is complete, restart the server, and then check the BIOS firmware version again to confirm whether the update is successful.
[0006] However, the security of the BIOS firmware is not guaranteed in each of these update steps. And when the last step of verifying the update is performed, after restarting the server, if the BIOS update fails and the server cannot start, it is necessary to use the BMC to repeat the above steps to update again. If an unexpected power outage or interruption occurs during the update process, the system may not start or even be permanently damaged.
[0007] Therefore, how to improve the existing BIOS firmware update method to provide a more intelligent, efficient and secure method for BMC to update server BIOS firmware. Summary of the invention
[0008] The purpose of the present invention is to provide a software fault pre-diagnosis method system by mounting a domestic server, thereby simplifying the process, achieving a one-stop solution, and improving the efficiency of server software diagnosis.
[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0010] A method for securely updating server BIOS firmware using a BMC, comprising the following steps:
[0011] S1: Deploy the AI algorithm model in the BMC system and train the deployed AI algorithm model through the read and write data of the historical flash chip;
[0012] S2: The BMC system randomly writes random numbers to several addresses of the flash chip, reads the data in the corresponding addresses, and inputs the read and written data into the trained AI algorithm model;
[0013] S3: Use the trained AI algorithm model to determine whether the flash chip is abnormal based on the written and read data. If not, execute step S4. If yes, suspend the server BIOS firmware update and report the flash chip abnormality.
[0014] S4: Check the updated BIOS firmware version, determine whether the updated BIOS firmware version is greater than the current BIOS firmware version, and determine whether the version format of the updated BIOS firmware version matches. If both judgment results are yes, execute step S5, otherwise, suspend the BIOS firmware update and report the BIOS firmware version abnormality;
[0015] S5: Encrypt the BIOS firmware file and upload the BIOS firmware file to the server;
[0016] S6: Check the uploaded BIOS firmware file to verify whether the BIOS firmware is damaged. If not, execute step S7. If so, suspend the update and report the BIOS firmware file abnormality.
[0017] S7: Read the BIOS firmware file, and check and compare the BIOS firmware read from the flash chip with the written BIOS firmware to determine whether they are consistent. If so, restart the server to update.
[0018] Preferably, step S1 includes the following specific process:
[0019] S11: deploying an AI algorithm model in the BMC system, where the AI algorithm model is a convolutional neural network model or a recurrent neural network model;
[0020] S12: obtaining the historical read and write data of the flash chip of the BMC system, and dividing the historical read and write data of the flash chip into a training set, a test set, and a verification set;
[0021] S13: Input the training set, test set and verification set into the AI algorithm model in sequence, train, test and verify the AI algorithm model in sequence, and determine whether the performance indicators in the verification results meet the expected requirements. If so, execute step S2; if not, re-acquire the read and write data of the new historical flash chip, and train, test and verify the AI algorithm model.
[0022] Preferably, in step S2, the following specific processes are included:
[0023] S21: The BMC system randomly writes random numbers to several addresses of the flash chip and reads the data in the corresponding addresses;
[0024] S22: Repeat the process of writing the random number and reading the data in the corresponding address for a specified number of times;
[0025] S23: inputting the random number written a specified number of times and the data read out from the corresponding address into the AI algorithm model;
[0026] The specified number of times is at least 10 times.
[0027] Preferably, the specific process of determining whether the flash chip is abnormal based on the written and read data by the trained AI algorithm model in step S3 is as follows:
[0028] S31: Compare the written data and read data of the specified number of times through the trained AI algorithm model;
[0029] S32: Determine whether the written data and the read data each time in the specified number of times are consistent;
[0030] S33: Calculate the number of times the written data and the read data are consistent;
[0031] S34: Calculate the ratio of the number of times the written data and the read data are consistent to the specified number of times in steps S31 and S32, and determine whether the ratio is greater than or equal to a preset ratio threshold. If so, determine that the flash chip is normal; if not, determine that the flash chip is abnormal.
[0032] Preferably, in step S5, the process of encrypting the BIOS firmware file adopts the SSL encryption algorithm, and the specific process is as follows:
[0033] S51: The BMC system initiates a key negotiation request to the server;
[0034] S52: The BMC system negotiates the encryption key with the server. After the encryption key negotiation succeeds, step S53 is executed.
[0035] S53: The BMC system encrypts the BIOS firmware file based on the encryption key, and uploads the encrypted BIOS firmware and certificate to the server.
[0036] Preferably, the specific process in step S6 is as follows:
[0037] The server verifies the BIOS firmware file based on the negotiated encryption key and certificate to determine whether the BIOS firmware file is damaged. If not, execute step S7; if so, suspend the update and report the BIOS firmware file abnormality.
[0038] Preferably, the verification process of the BIOS firmware file uses a MAC algorithm to perform integrity verification.
[0039] Preferably, when an unexpected power outage occurs during the BIOS firmware update process, a risk management process is set, and the specific process is as follows:
[0040] Step 1: After power-on, monitor the performance parameters of the power supply in real time, and compare the monitored performance parameters with the standard performance parameters to determine whether the power supply exists. If so, proceed to step 2. If not, suspend the update, maintain the power supply, and continue to monitor the performance parameters until it is normal.
[0041] Step 2: Read the BIOS firmware file loaded in the flash chip of the BIOS firmware;
[0042] Step 3: Compare the read BIOS firmware file with the last written BIOS firmware file to determine whether the comparison is successful. If so, continue to update the BIOS firmware until the update is successful. If not, re-read the BIOS firmware file until the update is successful.
[0043] The beneficial effects of the present invention include:
[0044] The method for securely updating server BIOS firmware using BMC provided by the present invention deploys an AI algorithm model in the BMC system, and trains the deployed AI algorithm model through the read and write data of the historical flash chip; the BMC system randomly writes random numbers to several addresses of the flash chip, and reads the data in the corresponding addresses and inputs them into the AI algorithm model; the AI algorithm model determines whether the flash chip is abnormal according to the written and read data, verifies the updated BIOS firmware version, determines whether the updated BIOS firmware version is greater than the current BIOS firmware version and whether the version format of the updated BIOS firmware version matches; encrypts the BIOS firmware file, and uploads the BIOS firmware file to the server; verifies the uploaded BIOS firmware file to verify whether the BIOS firmware is damaged, reads the BIOS firmware file, verifies the BIOS firmware read from the flash chip and compares it with the written BIOS firmware, and restarts the server for updating.
[0045] AI can automatically determine the quality of the flash chip and prompt the user to replace it in time. By adding verification actions to each step of the update process, the security of the BIOS firmware is ensured at each step to avoid security issues during the update process. When an unexpected power outage or interruption occurs during the update, a risk program is implanted to ensure that the system can start normally after the update, increasing the server's risk resistance. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The present invention is a flowchart of a method for securely updating server BIOS firmware using a BMC.
[0047] Figure 2 Schematic diagram of the structure of the recurrent neural network of the present invention.
[0048] Figure 3 The present invention is a flow chart of the SSL encryption algorithm in the method for securely updating server BIOS firmware using BMC. DETAILED DESCRIPTION
[0049] The following is combined with Figure 1~Figure 3 The present invention is further described in detail:
[0050] Example 1
[0051] See also Figure 1 As shown, a method for BMC to securely update server BIOS firmware includes the following steps:
[0052] S1: Deploy the AI algorithm model in the BMC system and train the deployed AI algorithm model through the read and write data of the historical flash chip;
[0053] S2: The BMC system randomly writes random numbers to several addresses of the flash chip, reads the data in the corresponding addresses, and inputs the read and written data into the trained AI algorithm model;
[0054] S3: Use the trained AI algorithm model to determine whether the flash chip is abnormal based on the written and read data. If not, execute step S4. If yes, suspend the server BIOS firmware update and report the flash chip abnormality.
[0055] S4: Check the updated BIOS firmware version, determine whether the updated BIOS firmware version is greater than the current BIOS firmware version, and determine whether the version format of the updated BIOS firmware version matches. If both judgment results are yes, execute step S5, otherwise, suspend the BIOS firmware update and report the BIOS firmware version abnormality;
[0056] S5: Encrypt the BIOS firmware file and upload the BIOS firmware file to the server;
[0057] S6: Check the uploaded BIOS firmware file to verify whether the BIOS firmware is damaged. If not, execute step S7. If so, suspend the update and report the BIOS firmware file abnormality.
[0058] S7: Read the BIOS firmware file, and check and compare the BIOS firmware read from the flash chip with the written BIOS firmware to determine whether they are consistent. If so, restart the server to update.
[0059] First, before updating the server's BIOS firmware, deploy an AI algorithm model in the BMC system, obtain historical flash chip read and write data to train the deployed AI algorithm model, and then the BMC system randomly writes random numbers to several addresses of the flash chip, reads the data in the corresponding address, and inputs the read and write data into the trained AI algorithm model; the trained AI algorithm model determines whether the flash chip is abnormal based on the written and read data. The AI algorithm model can be used to identify whether the flash chip is abnormal, effectively improving the recognition efficiency and accuracy. If the flash chip is abnormal, the user is prompted to maintain or replace it to ensure that the flash chip can work normally during the subsequent update process.
[0060] Each step of the BIOS firmware update process is verified to ensure the safety of each step in the update process, so that the update process can be passed in one go. If an abnormal power outage or an unexpected interruption occurs during the update process, when the BMC is powered on, the firmware loaded in the flash chip of the BIOS firmware is read and then compared with the firmware written last time. If the comparison fails, it will automatically update again until the update is successful. Prevent unexpected power outages or interruptions during the update process to ensure that the system can start normally after the update.
[0061] Example 2
[0062] Based on Example 1, step S1 includes the following specific process:
[0063] S11: deploying an AI algorithm model in the BMC system, where the AI algorithm model is a convolutional neural network model or a recurrent neural network model;
[0064] S12: obtaining the historical read and write data of the flash chip of the BMC system, and dividing the historical read and write data of the flash chip into a training set, a test set, and a verification set;
[0065] S13: Input the training set, test set and verification set into the AI algorithm model in sequence, train, test and verify the AI algorithm model in sequence, and determine whether the performance indicators in the verification results meet the expected requirements. If so, execute step S2; if not, re-acquire the read and write data of the new historical flash chip, and train, test and verify the AI algorithm model.
[0066] The AI algorithm model is trained through the training set to enable it to acquire the ability to determine whether the read and write data of the flash chip is normal. The AI algorithm model is tested through the test set to determine whether the relevant parameters of the trained AI algorithm model meet the expected requirements. After the test results meet the expectations, the test results of the relevant parameters of the AI algorithm model are verified through the verification set. After the verification results meet the requirements, the AI algorithm model is used to correctly judge the read and write data of the current flash chip to ensure the accuracy of the judgment results.
[0067] In this embodiment, see Figure 2 The recurrent neural network model includes an input layer, a hidden layer and an output layer. The input layer is used to receive data written and read from the flash chip. Let the input data of the current time step be x t The data received by the hidden layer includes two parts: one is the input data of the current time step x t , and the output of the hidden layer at the previous time step ht -1 , the hidden layer output of the current time step is calculated through the activation function, that is, the new state ht , the calculation formula of the hidden layer is: ,in W hh is the weight from the previous hidden layer to the current hidden layer, Wx h is the weight from the input layer to the hidden layer, bh is the bias term of the hidden layer, σ is the activation function. The output layer further processes the output of the hidden layer to produce the final output result and output it.
[0068] In step S2, the following specific processes are included:
[0069] S21: The BMC system randomly writes random numbers to several addresses of the flash chip and reads the data in the corresponding addresses;
[0070] S22: Repeat the process of writing the random number and reading the data in the corresponding address for a specified number of times, wherein the specified number of times is at least 10 times;
[0071] S23: Input the random numbers written a specified number of times and the data read out from the corresponding addresses into the AI algorithm model.
[0072] For example, the BMC randomly writes random numbers to several addresses in the flash chip, then reads the data in these addresses and compares them with the written data, repeating this step 10 times. If the written and read data are the same for more than 9 times, the flash chip is considered intact. AI learns the algorithm and then automatically executes it to determine whether the flash chip is damaged.
[0073] The specific process of determining whether the flash chip is abnormal based on the written and read data by the trained AI algorithm model in step S3 is as follows:
[0074] S31: Compare the written data and read data of the specified number of times through the trained AI algorithm model;
[0075] S32: Determine whether the written data and the read data each time in the specified number of times are consistent;
[0076] S33: Calculate the number of times the written data and the read data are consistent;
[0077] S34: Calculate the ratio of the number of times the written data and the read data are consistent to the specified number of times in steps S31 and S32, and determine whether the ratio is greater than or equal to a preset ratio threshold. If so, determine that the flash chip is normal; if not, determine that the flash chip is abnormal.
[0078] See also Figure 3 In step S5, the process of encrypting the BIOS firmware file adopts the SSL encryption algorithm, and the specific process is as follows:
[0079] S51: The BMC system initiates a key negotiation request to the server;
[0080] S52: The BMC system negotiates the encryption key with the server. After the encryption key negotiation succeeds, step S53 is executed.
[0081] S53: The BMC system encrypts the BIOS firmware file based on the encryption key, and uploads the encrypted BIOS firmware and certificate to the server.
[0082] The key negotiation process in step S52 may use symmetric key negotiation, public key negotiation, or Diffie-Hellman key negotiation.
[0083] The specific process in step S6 is as follows:
[0084] The server verifies the BIOS firmware file based on the negotiated encryption key and certificate to determine whether the BIOS firmware file is damaged. If not, execute step S7; if so, suspend the update and report the BIOS firmware file abnormality. The verification process of the BIOS firmware file uses the MAC algorithm for integrity verification.
[0085] When an unexpected power outage occurs during the BIOS firmware update process, set up a risk management process. The specific process is as follows:
[0086] Step 1: After power-on, monitor the performance parameters of the power supply in real time, and compare the monitored performance parameters with the standard performance parameters to determine whether the power supply exists. If so, proceed to step 2. If not, suspend the update, maintain the power supply, and continue to monitor the performance parameters until it is normal.
[0087] Step 2: Read the BIOS firmware file loaded in the flash chip of the BIOS firmware;
[0088] Step 3: Compare the read BIOS firmware file with the last written BIOS firmware file to determine whether the comparison is successful. If so, continue to update the BIOS firmware until the update is successful. If not, re-read the BIOS firmware file until the update is successful.
[0089] In summary, the method for BMC to securely update server BIOS firmware provided by the present invention deploys an AI algorithm model in the BMC system; the BMC system randomly writes random numbers to several addresses of the flash chip, and reads the input AI algorithm model to determine whether the flash chip is abnormal, verifies the updated BIOS firmware version, and determines whether the updated BIOS firmware version is greater than the current BIOS firmware version and whether the version format of the updated BIOS firmware version matches; encrypts the BIOS firmware file and uploads the BIOS firmware file to the server; verifies whether the BIOS firmware is damaged, reads the BIOS firmware file, and verifies that the BIOS firmware read in the flash chip is compared with the written BIOS firmware, and restarts the server for updating. The quality of the flash chip is automatically judged by AI, and the user is prompted to replace it in time. By adding verification actions to each step of the update step, the security of the BIOS firmware in each step is ensured, and security problems are avoided during the update process. When an unexpected power outage or an unexpected interruption occurs during the update, a risk program is implanted to ensure that the system can start normally after the update, thereby increasing the server's risk resistance.
Claims
1. A method for securely updating server BIOS firmware using BMC, characterized in that: The following steps are involved: S1: Deploy the AI algorithm model in the BMC system and train the deployed AI algorithm model through the read and write data of the historical flash chip; S2: The BMC system randomly writes random numbers to several addresses of the flash chip, reads the data in the corresponding addresses, and inputs the read and written data into the trained AI algorithm model; S3: Use the trained AI algorithm model to determine whether the flash chip is abnormal based on the written and read data. If not, execute step S4. If yes, suspend the server BIOS firmware update and report the flash chip abnormality. S4: Check the updated BIOS firmware version, determine whether the updated BIOS firmware version is greater than the current BIOS firmware version, and determine whether the version format of the updated BIOS firmware version matches. If both judgment results are yes, execute step S5, otherwise, suspend the BIOS firmware update and report the BIOS firmware version abnormality; S5: Encrypt the BIOS firmware file and upload the BIOS firmware file to the server; S6: Check the uploaded BIOS firmware file to verify whether the BIOS firmware is damaged. If not, execute step S7. If so, suspend the update and report the BIOS firmware file abnormality. S7: Read the BIOS firmware file, and check and compare the BIOS firmware read from the flash chip with the written BIOS firmware to determine whether they are consistent. If so, restart the server to update.
2. A method for securely updating server BIOS firmware using BMC according to claim 1, characterized in that: Step S1 includes the following specific processes: S11: deploying an AI algorithm model in the BMC system, where the AI algorithm model is a convolutional neural network model or a recurrent neural network model; S12: obtaining the historical read and write data of the flash chip of the BMC system, and dividing the historical read and write data of the flash chip into a training set, a test set, and a verification set; S13: Input the training set, test set and verification set into the AI algorithm model in sequence, train, test and verify the AI algorithm model in sequence, and determine whether the performance indicators in the verification results meet the expected requirements. If so, execute step S2; if not, re-acquire the read and write data of the new historical flash chip, and train, test and verify the AI algorithm model.
3. A method for securely updating server BIOS firmware using BMC according to claim 1, characterized in that: In step S2, the following specific processes are included: S21: The BMC system randomly writes random numbers to several addresses of the flash chip and reads the data in the corresponding addresses; S22: Repeat the process of writing the random number and reading the data in the corresponding address for a specified number of times; S23: inputting the random number written a specified number of times and the data read out from the corresponding address into the AI algorithm model; The specified number of times is at least 10 times.
4. A method for securely updating server BIOS firmware using BMC according to claim 3, characterized in that: The specific process of determining whether the flash chip is abnormal based on the written and read data by the trained AI algorithm model in step S3 is as follows: S31: Compare the written data and read data of the specified number of times through the trained AI algorithm model; S32: Determine whether the written data and the read data each time in the specified number of times are consistent; S33: Calculate the number of times the written data and the read data are consistent; S34: Calculate the ratio of the number of times the written data and the read data are consistent to the specified number of times in steps S31 and S32, and determine whether the ratio is greater than or equal to a preset ratio threshold. If so, determine that the flash chip is normal; if not, determine that the flash chip is abnormal.
5. A method for securely updating server BIOS firmware using BMC according to claim 1, characterized in that: In step S5, the process of encrypting the BIOS firmware file adopts the SSL encryption algorithm, and the specific process is as follows: S51: The BMC system initiates a key negotiation request to the server; S52: The BMC system negotiates the encryption key with the server. After the encryption key negotiation succeeds, step S53 is executed. S53: The BMC system encrypts the BIOS firmware file based on the encryption key, and uploads the encrypted BIOS firmware and certificate to the server.
6. A method for securely updating server BIOS firmware using BMC according to claim 5, characterized in that: The specific process in step S6 is as follows: The server verifies the BIOS firmware file based on the negotiated encryption key and certificate to determine whether the BIOS firmware file is damaged. If not, execute step S7; if so, suspend the update and report the BIOS firmware file abnormality.
7. A method for securely updating server BIOS firmware using BMC according to claim 6, characterized in that: The verification process of the BIOS firmware file uses the MAC algorithm for integrity verification.
8. A method for securely updating server BIOS firmware using BMC according to claim 1, characterized in that: When an unexpected power outage occurs during the BIOS firmware update process, set up a risk management process. The specific process is as follows: Step 1: After power-on, monitor the performance parameters of the power supply in real time, and compare the monitored performance parameters with the standard performance parameters to determine whether the power supply exists. If so, proceed to step 2. If not, suspend the update, maintain the power supply, and continue to monitor the performance parameters until it is normal. Step 2: Read the BIOS firmware file loaded in the flash chip of the BIOS firmware; Step 3: Compare the read BIOS firmware file with the last written BIOS firmware file to determine whether the comparison is successful. If so, continue to update the BIOS firmware until the update is successful. If not, re-read the BIOS firmware file until the update is successful.
