Protection system and method for memory

By introducing security software and protection units into the memory, generating exceptions and comparing them with the authorization table, the problem of unauthorized memory access is solved, and effective protection of memory and information security is achieved.

CN112486862BActive Publication Date: 2024-11-01STMICROELECTRONICS (GRAND OUEST) SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010952674.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-09-12
Filing Date
2020-09-11
Publication Date
2024-11-01
Estimated Expiration
2040-09-11

AI Technical Summary

Technical Problem

Existing memory protection systems are difficult to effectively limit unauthorized memory access, resulting in insufficient information security.

Method used

By introducing security software and memory protection units into the memory, exceptions are generated to determine the characteristics of the action, and using exception information to compare with the authorization table, ensuring that only authorized software can perform actions in the memory, and the security software HANDLER is used to decrypt the exception and Perform authorization actions.

Benefits of technology

It realizes effective protection of memory, ensures that non-privileged software cannot access protected areas, improves information security, allows privileged software to perform actions in specific areas, and enhances memory security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112486862B_ABST
    Figure CN112486862B_ABST
Patent Text Reader

Abstract

Various embodiments of the present disclosure are directed to protection systems and methods for memory.An embodiment system for protecting memory includes security software configured to determine, from an exception generated during an attempt of an unauthorized action in memory, whether the security software can perform the action.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of French application No. 1910065, filed on September 12, 2019, which is incorporated herein by reference. Technical Field

[0003] The present disclosure generally relates to memory protection systems and methods. Background Art

[0004] Security is a major issue for businesses in the computer or electronics field and for all participants around it. In particular, the security of the memory of electronic devices and therefore the security of information is particularly important.

[0005] In computers, protection of memory is typically accomplished by a set of systems implemented at the hardware and software levels so that one process cannot access memory used by another process or cannot access protected information. Summary of the invention

[0006] One embodiment addresses all or some of the disadvantages of known memory protection systems.

[0007] One embodiment provides a system for protecting memory, the system including security software configured to determine from an exception generated during an attempt to perform an unauthorized action in memory whether the security software can perform the action.

[0008] According to one embodiment, the action attempts to be performed by other software.

[0009] According to one embodiment, the security software is configured to derive characteristics of the action from the generated exception.

[0010] According to one embodiment, at least some of the obtained characteristics include the following: the address of the memory targeted by the action attempt, the identification of the software attempting the action in the memory, the action being attempted by other software, the operator code of the action, the register of the action.

[0011] According to one embodiment, the security software is configured to compare the obtained characteristics of the action with information representative of the action that can be executed in the memory.

[0012] According to one embodiment, the programming information is accessible only to the security software.

[0013] According to one embodiment, a system includes a protection unit for a memory, the protection unit being configured to define regions in the memory and to assign protection levels to the regions.

[0014] According to one embodiment, the exception is generated by a protection unit of the memory.

[0015] Another embodiment provides a method for a protection system using memory, comprising the steps of generating an exception during an attempt to perform an unauthorized action in memory; and determining from the exception using security software whether the security software is authorized to perform the action.

[0016] According to one embodiment, the method comprises a step for deciphering the anomaly in order to obtain the characteristics of the action.

[0017] According to one embodiment, the method comprises a step during which the security software performs the action.

[0018] According to one embodiment, the other software then continues its execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The foregoing features and advantages, as well as other advantages, will be described in detail in the following description of specific embodiments given by way of example and not limitation, with reference to the accompanying drawings, in which:

[0020] Figure 1 One embodiment of a memory protection system is illustrated; and

[0021] Figure 2 Shows Figure 1 An exemplary method of using an embodiment of a memory protection system. DETAILED DESCRIPTION

[0022] In the various drawings, similar features have been designated by similar reference numerals. In particular, common structural and / or functional features between the various embodiments may have the same reference numerals and may be arranged with the same structure, dimensions, and material properties.

[0023] For the sake of clarity, only the operations and elements useful for understanding the embodiments described herein are illustrated and described in detail. In particular, the device including the memory protection system will not be described in detail.

[0024] Unless otherwise indicated, when referring to two elements being connected together, this means a direct connection without any intermediate elements other than conductors; and when referring to two elements being coupled together, this means the two elements may be connected or they may be coupled via one or more other elements.

[0025] In the following disclosure, unless otherwise indicated, when referring to absolute position modifiers (such as terms "front", "back", "top", "bottom", "left", "right", etc.) or relative position modifiers (such as terms "above", "below", "upper", "lower", etc.), or when referring to directional modifiers (such as "horizontal", "vertical", etc.), it refers to the orientation shown in the figure.

[0026] Unless otherwise specified, the expressions "about," "approximately," "substantially," and "approximately" mean within 10%, and preferably within 5%.

[0027] Figure 1 One embodiment of a memory protection system 100 is illustrated.

[0028] The system is for example a part of an electronic device such as a computer, a phone or any other electronic device comprising a microcontroller and at least one memory.

[0029] Figure 1 A box 102 representing a memory is included. Box 102 may represent a single memory or several memories. Memory 102 may be one or several volatile memories or non-volatile memories, or several memories of which some memories are volatile and others are non-volatile. For example, memory 102 includes ROM-type memory, flash-type memory, RAM-type memory, and optionally other types of memory.

[0030] The system includes a memory protection unit 104 (MPU). The memory protection unit is, for example, part of a memory management unit (MMU). The memory protection unit may also optionally replace the memory management unit. The protection unit 104 and the optional memory management unit are typically part of a central processing unit (CPU).

[0031] The protection unit 104 is, for example, a hardware component. Therefore, the protection unit 104 is, for example, not software. Software refers to a set of instruction sequences that can be interpreted by a device, for example, including a microcontroller, and a set of data required for these operations. Therefore, software determines the actions that can be performed by the device.

[0032] The protection unit 104 makes it possible to authorize so-called privileged access software or privileged software to access areas in the memory that have been defined by the protection unit. The protection unit 104 also assigns authorization levels or protection levels to different areas, i.e. determines the actions that can be performed in these areas of the memory and determines what software can perform these actions.

[0033] Each region is defined by a start address and an end address or by a start address and a size.

[0034] For example, software may have two types of authorization levels, privileged access (or privileged software) or non-privileged access (or non-privileged software). Each region defined by protection unit 104 allows certain actions for privileged types of software and certain actions for non-privileged types of software.

[0035] For example, certain areas, such as area 106 (RW—read and write), authorize both privileged types of software and non-privileged types of software to read and write in that area of ​​memory.

[0036] For example, certain areas, such as area 108 (RO - read only), authorize privileged type software to read and write in that area of ​​memory, and authorize non-privileged type software to read, but not write in that area of ​​memory. Thus, non-privileged type software has limited access to area 108 of memory.

[0037] Alternatively, the software may be divided into a greater number of authorization levels. The software at each authorization level may perform certain actions on certain areas of memory, and optionally may not perform other actions on certain areas of memory. For example, the software may be privileged, i.e., have access to the entire memory, or may otherwise be non-privileged, i.e., have different restrictions, different authorizations, and different access rights.

[0038] There is a limit to the number of regions of memory that can be defined by the protection unit 104. For example, some protection units may define 8 or 16 regions of memory.

[0039] In order to optimize protection and optimize the division of regions of memory, some regions defined by protection units 104 may overlap.

[0040] Region 110 (RO-read only) may be located in region 112 (RW-read write). Region 112 extends from address 0xY1 to address 0xY4, for example. Region 110 extends from address 0xY2 to address 0xY3, for example. Address 0xY4 is located after address 0xY3. Address 0xY3 is located after address 0xY2. Address 0xY2 is located after address 0xY1.

[0041] Therefore, although the address of the region 110 included between 0xY2 and 0xY3 is also located in the region 112 between 0xY1 and 0xY4 , the region 110 has a different authorization level than the other portions of the region 112 .

[0042] However, it is not possible to define sufficient areas in the memory so that the entire memory has a sufficient authorization level for its use.

[0043] In order to ensure the security of the memory and limit the number of regions, it is usually selected to define a wide area with a high authorization level in the memory. The high authorization level, for example, refers to a level that only allows software of a privileged type to write and optionally read. Therefore, the majority of the memory can be protected when a limited number of regions are used. However, the part of the memory that wishes to assign a high authorization level is not all located continuously in the memory. Therefore, the part of the memory that wishes to assign a lower or weaker protection level (for example, the area that wishes to authorize reading and writing to all software in the software) may be located in the area with a higher authorization level.

[0044] For example, information about a clock may be located, for example, in area 108. Non-privileged type software may seek to use, read or write this information, but will not be able to access it.

[0045] In practice, the protection unit 104 supervises the actions and instructions of the software attempting to access the memory. The protection unit 104 determines, according to the type of software and according to the authorization level of the target area, whether the software can perform the action in the memory.

[0046] If unit 104 determines that the software is authorized to perform an action in memory, the software may perform the action, such as reading or writing in memory. An action is performed by the software that requested the action (ie, the software that sent the instruction).

[0047] If unit 104 determines that the software is not authorized to perform an action in memory, the software does not perform the action. Additionally, an exception is generated by protection unit 104.

[0048] The exception indicates an unauthorized access attempt, ie, the software sought to perform an action that the software was not authorized to perform.

[0049] Figure 1 A block 114 is included, which, for example, shows another portion of a memory. Block 114 may also show several memories. Similar to the case of block 102, block 114 may show a single memory or several memories. Block 114 may be one or several volatile memories or non-volatile memories, or several memories in which some memories are volatile and other memories are non-volatile. For example, block 114 includes a ROM type memory, a flash memory type memory, a RAM type memory, and optionally includes other types of memory.

[0050] Box 114 includes the software of system 100. Box 114 specifically includes the safety software HANDLER shown by box 116. Box 114 also includes two software applications A and B shown by boxes 118 and 120, respectively. Box 114 includes other software applications not shown.

[0051] Software application A is, for example, a privileged type of software. For example, software application A can access, read and write all of the parts in the memory. For example, software application A has the right to write and read in area 106RW and area 108RO.

[0052] Software application B is, for example, a non-privileged type of software application. Therefore, software application B is limited in the actions it can perform in the memory. Therefore, software application B cannot write in area 108RO. However, software application B can read and write in area 106RW.

[0053] exist Figure 1 In the embodiment of the system, the system further comprises software HANDLER. For example, the software HANDLER is at least partially located in the same memory as software A and / or software B.

[0054] The software HANDLER is configured to receive an exception that is raised when an unauthorized access attempt is made to the memory 102. The exception is raised, for example, by the protection unit 104. The exception may optionally be received by one or several other elements in the device.

[0055] The software HANDLER is configured to be able to decrypt the exceptions issued during the unauthorized access attempt. More specifically, the software HANDLER is configured to be able to obtain the characteristics of the access attempt from the exceptions.

[0056] Thus, the software is configured to determine at least some of the following: the address of the memory to which the access attempt is directed, the identity of the software (e.g., software A or B) attempting to access memory 102, the action that the software seeks to perform, the operator code for the action, the variables for the action, and optionally other information.

[0057] In one example, software B seeks to perform an action "STR R1[R8]" in a register associated with a peripheral device. Assume that the portion of memory 102 containing this register is in an area RO that is not accessible to software B, such as in area 108. The software HANDLER can then determine, for example from the generated exception:

[0058] the portion of the target memory;

[0059] The logo of software B;

[0060] The action that software B seeks to perform;

[0061] Whether a write operation is involved;

[0062] whether the write is to or is to the memory location whose address is contained in register R8; and

[0063] The value to be written is the value contained in register R1.

[0064] The software HANDLER is configured to compare this information with table 122 (TABLE) in order to determine whether the action is authorized.

[0065] A table TABLE is contained in the memory of the device. The table comprises information representing actions that can be performed.

[0066] For example, table 122 includes characteristics of actions that can be executed in memory 102. More specifically, table 122 includes characteristics of actions that are not authorized by protection unit 104 in an area but can be executed with the help of software HANDLER.

[0067] The characteristics of the table relate more specifically to more or less specific actions. For example, the table may include characteristics that make it possible to determine whether non-privileged software can read and write in an area included in an area (such as area 108). The table may also make it possible to determine that these actions only apply to specific non-privileged software, rather than all non-privileged software in the non-privileged software. The table may also include all characteristics of the characteristics of the action. For example, the action "STR R0[R8]" described above may be authorized, but the operation "STR R0[R9]" may not be authorized. Therefore, all characteristics of the characteristics of the action "STR R0[R8]" are included in table 122 so that it can be determined whether the action is authorized.

[0068] The table is preferably accessible only by the software HANDLER. For example, this is established by hardware. The table is, for example, contained in a memory that contains only the table. The memory containing the table is, for example, a memory separate from other memories used in the operation of the device. For example, the memory containing the table is physically accessible only by the software HANDLER.

[0069] The software HANDLER is also configured to be able to access the memory 102, preferably the entire memory, and in particular to be able to access rules that are not accessible to non-privileged software. Therefore, the software HANDLER can access the area in the memory 102 where unauthorized access is attempted.

[0070] The software HANDLER is configured to be able to execute the action that triggered the exception if the software HANDLER determines according to the table TABLE that the unauthorized action is authorized.

[0071] If the action is not authorized by the protection unit 104 but is authorized by the information contained in the table TABLE, the action is performed by the software HANDLER and not by the original software (e.g., software B) whose access attempt to the memory triggered the exception. Thus, although the action can be performed, the original software does not act in an area to which it does not have access rights. Therefore, the action is completed by software (software HANDLER) with an authorization level that allows access to the area of ​​the memory in question.

[0072] The contents of the table are programmed, for example, during the manufacture of the device. The contents of the table are programmed, for example, during the establishment of authorizations and protection levels for different areas of the memory. The contents of the table are written, for example, by the software HANDLER.

[0073] As a variation, the device may include several software application HANDLERs. Each software application HANDLER is associated with a memory, for example. For example, the software application HANDLERs are all associated with a table 122. For example, some software application HANDLERs are associated with the same table 122.

[0074] Figure 2 Shows Figure 1 An exemplary method of using an embodiment of a memory protection system.

[0075] During a first step 200 (C: send command), a software application C attempts to access a region of memory in order to perform an action therein.

[0076] For example, software C is a software application contained in the same memory as software HANDLER and / or software A and / or software B.

[0077] Thus, software C sends instructions, ie code making it possible to implement the action that software C wishes to execute in memory. For example, software C seeks to execute the action "STR R0[R8]" in a register associated with a peripheral device.

[0078] When software C attempts to reach memory 102, the memory protection unit 104 determines whether the action is allowed. This is step 202 (C is allowed?). Therefore, the memory protection unit determines whether software C has a sufficient authorization level to perform the action in this area of ​​memory.

[0079] If software C has a sufficient authorization level (branch Y), software C performs the action. This is step 204 (C: Execute Instruction). For example, software C is privileged software and can access all areas in the region of memory. For example, even for non-privileged software, the action that software C wants to perform is authorized in this area of ​​memory. For example, the action to be performed is a read action of area RO, in which non-privileged software can read memory. For example, the action to be performed is a write action of area RW, in which non-privileged software can read and write in memory.

[0080] This action is then performed by software C directly in memory.

[0081] If software C does not have a sufficient authorization level (branch N), an exception is generated. This is step 206 (Exception). The exception is raised, for example, by a protection unit of the memory.

[0082] During step 208 (HANDLER: RECEIVE EXCEPTION), the software HANDLER receives the exception. During step 210 (HANDLER: DECRYPT EXCEPTION), the software HANDLER decrypts the exception in order to obtain the characteristics of the unauthorized access attempt to the memory. The software HANDLER determines at least some of the following: the address of the memory to which the access attempt was directed, the identity of the software (e.g., software C) attempting to access the memory 102, the action that the software is seeking to perform, the operator code of the action, the register of the action, and optionally other information.

[0083] During a step 212 (HANDLER: compare with table), the software HANDLER compares the information obtained by decrypting the anomaly with the data contained in the table TABLE 122 .

[0084] The software HANDLER determines (step 214, instruction allowed?) whether the action can be performed, ie whether the action was authorized during programming of the table.

[0085] If the action is not authorized (branch N), ie if the information obtained from the exception does not correspond to the information contained in the table TABLE, the action is not performed (step 216, the instruction is not executed).

[0086] If the action is authorized (branch Y), that is, if the information obtained from the exception corresponds to the information contained in the table TABLE, the software HANDLER executes the action (step 218, HANDLER: execute instruction). Therefore, the access to the memory is completed by the software HANDLER to perform the action, and the modification of the register corresponding to the action is completed. Therefore, the software C cannot access the area of ​​the memory that does not correspond to its authorization level.

[0087] During step 220 (C: Receive Results), information resulting from the actions performed by the software HANDLER may be provided to the software C. For example, the software C may receive information read from a memory. The software C then continues its execution.

[0088] More generally, software C receives information that allows it to continue its execution as if it had performed its own actions. Software C therefore continues its operation.

[0089] Therefore, the action is performed by means of privileged software (software HANDLER). The exception generated during the access attempt by the unauthorized software application makes it possible to warn the software HANDLER that the software is trying to use an action that it can complete.

[0090] One advantage of the described embodiments is that actions from non-privileged software may be executed, including in memory areas that are not directly accessible to non-privileged software applications.

[0091] Various embodiments and variations have been described. Those skilled in the art will appreciate that certain features of these embodiments may be combined, and those skilled in the art will readily conceive of other variations.

[0092] Finally, actual implementation of the embodiments and variations described herein is within the capabilities of those skilled in the art based on the functional description provided above.

Claims

1. A system for protecting privileged memory, the system comprising: non-privileged software, wherein the non-privileged software is not authorized to perform a first action in the privileged memory; a hardware memory protection unit configured to generate an exception in response to an attempt by the non-privileged software to perform the first action in the privileged memory, and to issue the exception to the secure software; The security software is separated from the non-privileged software and is configured to: determining, from the exception generated in response to an attempt by the non-privileged software to perform the first action in the privileged memory, whether the secure software is authorized to perform the first action; as well as Based on determining that the security software is authorized to perform the first action, completing access to the privileged memory to perform the first action, and providing information generated by the security software performing the first action to the non-privileged software; The non-privileged software is configured to continue to perform another action of the non-privileged software subsequent to the first action based on the information generated by the first action performed by the security software. 2 . The system of claim 1 , wherein the security software is configured to obtain characteristics of the first action from the generated exception.

3. The system of claim 2, wherein the obtained characteristic comprises one or more of: an address of the privileged memory targeted by the attempt, an identification of the non-privileged software attempting the first action in the privileged memory, the first action that the non-privileged software is attempting to perform, an operator code for the first action, or a register for the first action. 4 . The system of claim 2 , wherein the security software is configured to compare the obtained characteristics of the first action with information representing actions that can be executed in the privileged memory.

5. The system of claim 4, wherein the information is accessible only by the security software. 6 . The system of claim 1 , wherein the hardware memory protection unit is further configured to define regions in the privileged memory and assign protection levels to the regions.

7. A method for protecting privileged memory, the method comprising: generating an exception by a hardware memory protection unit in response to an attempt by non-privileged software to perform a first action in the privileged memory, and issuing the exception to secure software, wherein the non-privileged software is not authorized to perform the first action in the privileged memory, and the secure software is separated from the non-privileged software; In response to the exception, determining, by the security software, whether the security software is authorized to perform the first action; Based on determining that the security software is authorized to perform the first action, the security software completes access to the privileged memory to perform the first action, and provides information generated by the security software performing the first action to the non-privileged software; as well as Based on the information generated by the first action performed by the security software, the non-privileged software continues to perform another action subsequent to the first action of the non-privileged software.

8. The method according to claim 7, further comprising: The exception is decrypted by the security software to obtain a characteristic of the first action.

9. The method of claim 7, wherein the determining further comprises: obtaining, by the security software, characteristics of the first action from the generated exception; as well as The obtained characteristic of the first action is compared, by the security software, with information representing actions executable in the privileged memory.

10. A system comprising: a first non-transitory memory storage device including privileged memory and non-privileged memory; a hardware memory protection unit in communication with the first non-transitory memory storage device, wherein the hardware memory protection unit is configured to: generate an exception in response to an attempt by non-privileged software to perform a first action in the privileged memory in the first non-transitory memory storage device, and issue the exception to secure software, wherein the non-privileged software is not authorized to perform the first action in the privileged memory; as well as a second non-transitory memory storage device, comprising the non-privileged software and the security software in communication with the hardware memory protection unit, wherein the security software is separate from the non-privileged software, wherein the security software is configured to: in response to the exception, determine whether the security software is authorized to perform the first action, and is configured to: In response to determining that the secure software is authorized to perform the first action, completing access to the privileged memory to perform the first action, and providing information generated by the secure software performing the first action to the non-privileged software; or In response to determining that the security software is not authorized to perform the first action, prohibiting performance of the first action; The non-privileged software is configured to continue to perform another action of the non-privileged software subsequent to the first action based on the information generated by the first action performed by the security software.

11. The system of claim 10, wherein the first non-transitory memory storage device and the second non-transitory memory storage device are the same memory storage device.

12. The system of claim 10, wherein the security software is configured to determine comprises the security software being configured to: obtaining a characteristic of the first action from the generated exception; and The obtained characteristic of the first action is compared with information representing an action executable in the first non-transitory memory storage device.

13. The system of claim 12, wherein the obtained characteristic comprises one or more of: an address of privileged memory targeted by the attempt, an identification of the non-privileged software attempting the first action, the first action that the non-privileged software is attempting to perform, an operator code for the first action, or a register for the first action.

14. The system of claim 10, wherein the hardware memory protection unit is further configured to: defining a plurality of regions in the first non-transitory memory storage device; and A privileged protection level or a non-privileged protection level is assigned to each of the regions.