Security defending method and electronic apparatus
Abstract
A security defending method and an electronic apparatus are disclosed. The security defending method is applicable in a coprocessor, including: receiving a jump destination encryption request for the operation task; using mask configuration to perform first mask processing on the first jump destination address value to obtain a first intermediate jump destination address value; performing an authentication operation based on the first jump destination storage address, a key reference value corresponding to the operation task and the first intermediate jump destination address value, to obtain a first encryption result value; using the mask configuration to perform second mask processing on the first encryption result value to obtain a first intermediate encryption result value; performing an authentication operation on the first intermediate encryption result value and the first jump destination address value to obtain a first encryption jump destination address value. The security defending method can prevent buffer overflow attacks.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 13 · Forward citations: 0.
Claims (8)
- Claim 1Independent Claim
A security defending method of an operation task, applicable in a main processor running the operation task, comprising: sending a mask configuration instruction from the main processor to a coprocessor, wherein the mask configuration instruction is used to instruct the coprocessor to save mask configuration in a mask register of the coprocessor, wherein the mask configuration is used for the coprocessor to perform mask processing on a received destination address value in an encryption procedure and an authentication procedure; and sending a reference address configuration instruction corresponding to the operation task from the main processor to the coprocessor, wherein the reference address configuration instruction is used to instruct the coprocessor to save a reference address in a reference address register of the coprocessor, wherein the reference address is used for the coprocessor to perform an authentication operation in the authentication procedure, wherein the encryption pr
- Claim 2Depends on #1
The security defending method according to claim 1, further comprising: sending a key reference value loading instruction to the coprocessor, in a case where a process corresponding to the operation task starts or cuts in on the main processor, to save the key reference value in a key reference value register of the coprocessor, wherein the key reference value is used for the coprocessor to generate a key in the encryption procedure and the authentication procedure.
- Claim 3Depends on #2
The security defending method according to claim 2, wherein the key reference value loading instruction comprises a source register saving the key reference value in the main processor, so that the coprocessor reads the key reference value from the source register, or the key reference value loading instruction instructs the coprocessor to generate the key reference value.
- Claim 4Depends on #3
The security defending method according to claim 3, further comprising: generating the key reference value in the main processor and saving the key reference value in the source register.
- Claim 5Depends on #2
The security defending methods according to claim 2, wherein the key reference value is a random number.
- Claim 6Depends on #2
The security defending method according to claim 2, further comprising: sending a key reference value storage instruction to the coprocessor, in a case where a process corresponding to the operation task is cut out on the main processor; and receiving and saving the key reference value returned by the coprocessor according to the key reference value storage instruction.
- Claim 7Depends on #6
The security defending method according to claim 6, wherein the key reference value is saved in a Process Control Block (PCB) corresponding to the operation task in the main processor.
- Claim 8Depends on #1
The security defending method according to claim 1, wherein the reference address conforms to a first mode defined by the mask configuration.
Technical Overview & Description
CROSS REFERENCE The application claims priority to Chinese patent application No. 202211029408.2, filed on Aug. 24, 2022, the entire disclosure of which is incorporated herein by reference as part of the present application. TECHNICAL FIELD Embodiments of the present disclosure relate to a security defending method and an electronic apparatus. BACKGROUND In recent years, one of the most common vulnerabilities affecting computer system security is buffer overflow attack. A successful buffer overflow attack may modify an operation control flow of the computer system, for example, may modify a return address of a program, EBP for calling functions, or modify a function pointer, a GOT table, etc., so as to lead the program to an attacker's preset attack program, to execute malicious codes and cause collapse of the entire program, or let the attacker gain control of a portion of the system, causing security crisis of the entire computer system. Therefore, it is of great practical significance to defend against buffer overflow attacks. Generally speaking, buffer overflow attacks may be divided into two modes: (I) directly tampering with key data for running programs such as EIP; and (II) indirectly tampering with key data such as EBP and EIP by modifying pointer variables, etc., through buffer overflow. In order to mitigate threats of memory security violations, some technologies are proposed. These technologies, such as the ASLR mechanism, increase difficulties for an attacker to jump to a specific memory location, by adding a random offset to a starting address of stack, heap and other memory segments where key data is stored, when initializing an address space of the program. Another example is the DEP mechanism, which implements the W ⊕ X principle of address, that is, a writable address is not executable, and an executable address is not writable. The DEP mechanism prevents an attacker from executing an injected malicious program segment by setting an address space o
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (13)
| Patent | Title | Year | Citations |
|---|