Secure access method for application program
By writing the application's permission access data description information in the virtual machine running domain, the problem that embedded operating systems cannot create a sandbox environment under resource-constrained environment is solved, and secure access and data protection of WebAssembly applications are achieved, avoiding the use of security access and data protection. Data breach risk.
Patent Information
- Application Number
- CN202411200467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-29
AI Technical Summary
In resource-constrained environments, embedded operating systems have difficulty creating sandbox environments and allocating the memory space required for applications, resulting in the inability to safely run WebAssembly-based applications.
By writing the application's permission access data description information in the virtual machine running domain bound by the logical channel, the application controls the application's secure access to data during operation, avoiding reading of data content, saving storage space and preventing Data breach.
It realizes the secure operation of WebAssembly applications in resource-constrained environments, saving storage space and preventing the risk of data leakage.
Smart Images

Figure CN119089436A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method for securely accessing an application program. Background Art
[0002] WebAssembly (wasm for short) belongs to the virtual instruction set architecture. Based on WebAssembly bytecode technology, applications can be written in a variety of programming languages, and the written applications are converted to generate WebAssembly bytecode, which is interpreted and executed by the virtual machine, so that the application can run normally.
[0003] Currently, when running an application based on WebAssembly bytecode in a general-purpose computer, it is necessary to start an independent thread to run the application in the sandbox environment provided by the operating system and allocate independent memory space for it. The sandbox restricts the access of the application in the sandbox to certain important resources by intercepting the application's call to operating system resources.
[0004] However, for embedded operating systems in resource-constrained environments, there are not enough resources to implement a sandbox environment, and it may not be possible to create independently running threads and allocate the memory space required for application runtime. In view of this, it is necessary to propose a new way of secure application access to effectively adapt to embedded operating systems in resource-constrained environments. Summary of the invention
[0005] The present invention provides a secure access method for an application program, so as to realize the secure operation of an application program based on WebAssembly in a resource-constrained environment.
[0006] According to one aspect of an embodiment of the present invention, a method for securely accessing an application is provided, which is executed by a runtime environment in an embedded operating system installed in a restricted device. The method includes:
[0007] When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written in the virtual machine execution domain corresponding to the target logical channel;
[0008] According to the virtual machine operation domain, the target application is controlled to perform secure access to data during operation.
[0009] According to another aspect of an embodiment of the present invention, there is also provided a secure access device for an application, which is configured in a runtime environment in an embedded operating system, and the embedded operating system is installed in a restricted device, and the device includes:
[0010] A description information writing module, used for writing description information of the target application program's permission access data in a virtual machine running domain corresponding to the target logical channel when the target application program is activated and running in the target logical channel;
[0011] The security access control module is used to control the target application program's secure access to data during operation according to the virtual machine operation domain.
[0012] According to another aspect of an embodiment of the present invention, a restricted device is further provided, wherein an embedded operating system is installed on the restricted device, a runtime environment is executed in the embedded operating system, and the restricted device includes:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform secure access to the application program as described in any one of the embodiments of the present invention.
[0016] According to another aspect of the embodiments of the present invention, a terminal is provided, comprising the restricted device as described in any one of the embodiments of the present invention.
[0017] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement secure access to an application as described in any one of the embodiments of the present invention when executed.
[0018] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the computer program implements secure access to an application according to any one of the embodiments of the present invention.
[0019] The technical solution of the embodiment of the present invention can control the secure access to data during the operation of the application program based on the description information of the permitted access data by independently writing the description information of the data that is permitted to be accessed by the application program activated and running in the logical channel in the virtual machine operation domain to which the logical channel is bound. In an operating system under a resource-constrained environment, the number of logical channels is limited, so there is no need to consume a large amount of storage space to record the above description information, thereby saving storage space. In addition, when an application program accesses data and code, the virtual machine operation domain can be used to check whether it complies with the access policy, without having to read the data content of the application data required to access, thereby avoiding the risk of data leakage.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a method for securely accessing an application program provided in an embodiment of the present invention;
[0023] Figure 2 It is a schematic diagram of various types of permission access data written in a virtual machine running domain applicable to an embodiment of the present invention.
[0024] Figure 3 is a flow chart of another method for securely accessing an application program provided in an embodiment of the present invention;
[0025] Figure 4 is a flow chart of another method for securely accessing an application program provided in an embodiment of the present invention;
[0026] Figure 5 is a flow chart of another method for securely accessing an application program provided in an embodiment of the present invention;
[0027] Figure 6 is a flow chart of another method for securely accessing an application program provided in an embodiment of the present invention;
[0028] Figure 7 is a structural diagram of a secure access device for an application provided according to an embodiment of the present invention;
[0029] Figure 8 is a structural diagram of a restricted device provided according to an embodiment of the present invention;
[0030] Fig. 9 is a structural diagram of a terminal provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Figure 1 A flowchart of a method for secure access to an application provided in an embodiment of the present invention. This embodiment can be applied to situations where the runtime environment in an embedded operating system controls the secure access of an application to data. The method can be executed by a secure access device for the application, which can be implemented in the form of hardware and / or software and can generally be configured in a restricted device (for example, various security elements or smart cards, etc.) installed with an embedded operating system.
[0034] The method in this embodiment is executed by the runtime environment in the embedded operating system. The runtime environment (RTE, Real-Time Environment) is a secure runtime environment for executing virtual machines on restricted resources such as smart cards or secure elements, and can be regarded as an ultra-lightweight container. The application runs in the runtime environment and can be completely isolated from the native functions of the embedded operating system.
[0035] Correspondingly, such as Figure 1 As shown, the method includes:
[0036] S110. When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written into the virtual machine execution domain corresponding to the target logical channel.
[0037] The logical channel can be understood as a concept used to establish a communication connection between the host and the restricted device. It allows multiple independent communication channels to be established between the host and the restricted device at the same time, each channel has its own command and response flow, and is isolated from each other.
[0038] Controlling the target application to activate and run within the target logical channel may include: when determining that the designated logical channel (i.e., the target logical channel) is in an open state, calling the application selection interface corresponding to the selected application (i.e., the target application); upon receiving an acceptance selection response fed back by the application selection interface, controlling the selected application to activate and run within the designated logical channel.
[0039] Alternatively, controlling the target application to activate and run within the target logical channel may also include: opening a specified logical channel (i.e., the target logical channel) in response to a logical channel opening instruction; obtaining a default selected application in the specified logical channel as a selected application (i.e., the target application), and controlling the selected application to activate and run within the specified logical channel.
[0040] Among them, the application program can be understood as an application program based on WebAssembly, and the goal of each embodiment of the present invention is to achieve the safe operation of the application program based on WebAssembly in a resource-constrained environment.
[0041] The virtual machine running domain refers to the virtual memory space built by RTE for the range of application running permission access data (also called accessible data). It records information such as application identification and logical channels. Corresponding to the logical channel, there is only one running application on each logical channel that is bound to the virtual machine running domain on the logical channel.
[0042] The description information of the target application's permission to access data is used to limit the data that the target application can access after being activated.
[0043] In an optional implementation of this embodiment, the description information of the permitted access data includes at least one of the following:
[0044] The storage address range of the permitted access data, the identifier of the permitted access data, and the data characteristics of the permitted access data.
[0045] The identifier of the permitted access data may include an application module identifier, an application program identifier, and a logical channel identifier; and the data characteristics of the permitted access data may include whether it is cross-domain data.
[0046] In this embodiment, by writing the storage address range of the permitted access data in the virtual machine running domain, after obtaining the data address of the target application's required access data, the data address is compared with the storage address range to determine whether the target application can access the required access data.
[0047] In addition, the identifier of the permission access data may be recorded through the virtual machine running domain, for example, to which application module the permission access data needs to belong, or to which virtual machine running domain the permission access data needs to correspond, etc. Alternatively, the identifier of the permission access data may be directly the application module identifier of the application module to which the target application belongs, the application identifier of the target application, and the logical channel identifier of the target logical channel, etc.
[0048] Accordingly, after obtaining the identifier of the required access data of the target application, by comparing the identifier of the required access data with the identifier of the permitted access data, it can be determined whether the target application can access the required access data.
[0049] At the same time, the data characteristics of the permitted access data can also be recorded through the virtual machine running domain, and the data characteristics are whether the permitted access data is cross-domain data. Specifically, when the permitted access data is cross-domain data, all virtual machine running domains permit the application to access the permitted access data, and when the permitted access data is not cross-domain data, only a specific virtual machine running domain permits access to the permitted access data. Among them, cross-domain data can be understood as a special temporary static variable data, which is not restricted by the virtual machine running domain access control policy, and applications of all application modules can access cross-domain data.
[0050] Based on the above embodiments, in an embedded operating system, data belonging to different modules (e.g., application modules or library modules) can be stored in different storage spaces according to data types based on preset data storage rules, or data belonging to different application programs of the same application can be stored in different storage spaces according to data types. Furthermore, after obtaining the storage address range of the permitted access data, the data type of the permitted access data can be obtained accordingly.
[0051] Furthermore, the description information of the permission access data recorded in the virtual machine running domain and the determined data type of the permission access data can be combined to control the target application program's secure access to data during running.
[0052] Based on the above embodiments, the types of the permission access data may include: module data set, module program set and application data set.
[0053] Among them, the module data set is used to store the collection of all data information within a specific module, including global data and local data.
[0054] Among them, global data refers to data defined in the application and visible to the entire module. Its scope is limited to a specific module, also known as global variables. This type of data is usually used to share information within the module, but is not visible or accessible in other modules. A module can be understood as an application executable code container contained in a binary file, including the application's instructions, data, and metadata, which can be directly run by the operating system. Modules generally include application modules and library modules.
[0055] Among them, global data includes: module read-only data and module global data.
[0056] Module read-only data refers to global data that is visible to the entire module but can only be read and not modified. It is usually used to store constants, configuration information, or other values that do not change during the application's runtime, such as the application's constant data. Module global data refers to global data that is visible to the entire module and can be modified by applications within the module, such as the application's global data or the application's global variable stack.
[0057] Furthermore, the global data may also include: module reference domain data or module domain data, etc.
[0058] Module reference domain data is a variable used to record temporary data or persistent data. Module reference domain data can be stored in the memory area of the non-volatile memory in the restricted device. The data referenced by the module reference domain data can be accessed by directly accessing the variable or API (Application Programming Interface).
[0059] The module domain data is stored in the memory area of the non-volatile memory in the restricted device. The module domain data space is shared within the module, and the module domain data can be accessed by directly accessing variables or by API.
[0060] Among them, local data refers to data defined in the application and visible only within a specific scope, and its lifecycle is limited to the specific scope. It is usually a temporary variable or function parameter defined inside a function, method, or code block, and can only be accessed and used within its scope.
[0061] The local data may include: local structure type data, local basic type data and function parameter data.
[0062] Local structure type data mainly refers to local data of types such as arrays, structures, and unions. It is structure type data defined inside a function. Local structure type data is stored in the indirect access variable stack. When the program runs and calls a function, the indirect access variable stack data memory is allocated, and when the function is exited, the indirect access variable stack data memory is reclaimed. Local basic type data mainly refers to basic type data defined inside a function. Function parameter data mainly refers to parameter type data input when a function is called.
[0063] In this embodiment, the module program set is used to store the set of all program code information or module program data in a specific module. The application data set is used to store the set of all data information in a specific application, that is, the application data of the application, including temporary data and persistent data.
[0064] Optionally, the application data set may include: temporary static variable data, temporary dynamic variable data and persistent data.
[0065] Among them, temporary static variable data and temporary dynamic variable data are both temporary data. Temporary data is a type of data used during the operation of an application. When a specific event occurs, it will be cleared or reset to ensure security and protect sensitive data.
[0066] Temporary static variable data means that whenever the embedded operating system is reset, the resource state will be reset to 0. This resource state will not be shared between applications and is usually used to store data related to a specific session or transaction to ensure security and data isolation. Temporary dynamic variable data means that during the interaction with the application, the resource state will be retained until the application is deselected, and the resource state will be cleared to 0. This resource is usually used to share temporary data between applications, such as temporary counters or caches.
[0067] Persistent data refers to a type of non-volatile storage data created by calling the storage space allocation interface provided by the operating system runtime environment during the installation or operation of the application module, and its initial value is 0. Persistent data belongs to the application itself, and the persistent data can be written and read through the interface or pointer variable provided by the operating system runtime environment. The virtual machine instruction can directly access the persistent data through the pointer variable.
[0068] The temporary static variable data includes data characteristics of whether it is cross-domain data. Optionally, a flag bit can be added to the temporary static variable data to describe whether the temporary static variable data is cross-domain data. If it is cross-domain data, the temporary static variable data can be accessed across virtual machine running domains. If it is not cross-domain data, the temporary static variable data cannot be accessed across virtual machine running domains.
[0069] Furthermore, the application data set may also include reference data, where reference data is data used to store reference domain data. When the application module creates an application, the reference data is allocated by the runtime environment of the operating system, and each application has only one reference data. In addition, the virtual machine accesses the module reference domain data, which is interpreted by the runtime environment of the operating system as access to the reference data of the currently running application, that is, access to the reference data content.
[0070] Optionally, the module read-only data is stored in a memory area of a non-volatile memory in the restricted device; the module global data is stored in a memory area of a volatile memory in the restricted device; and
[0071] Local structure type data, local basic type data and function parameter data are all stored in an indirect access variable stack in the volatile memory.
[0072] In addition, the application module reference domain data and the application module domain data are stored in a memory area of a non-volatile memory in the restricted device.
[0073] Optionally, the persistent data is stored in a memory area of a non-volatile memory in the restricted device; and the contents of the temporary static variable data and the temporary dynamic variable data are stored in a memory area of a volatile memory in the restricted device.
[0074] Additionally, the reference data is also stored in a memory area of the non-volatile memory in the constrained device.
[0075] By way of example and not limitation, Figure 2 A schematic diagram of various types of permission access data written in a virtual machine running domain applicable to an embodiment of the present invention is shown in FIG.
[0076] S120. Controlling secure data access of a target application during operation according to the virtual machine operation domain.
[0077] In this embodiment, after the target application is activated and running in the target logical channel, the description information of the target application's permission to access the data is written in the virtual machine running domain corresponding to the target logical channel. Whenever the target application wants to access the required access data, the relevant information recorded in the virtual machine running domain is queried by combining the type, identification or data characteristics of the required access data to determine whether the target application can access the required access data.
[0078] The technical solution of the embodiment of the present invention can control the secure access to data during the operation of the application program based on the description information of the permitted access data by independently writing the description information of the data that is permitted to be accessed by the application program activated and running in the logical channel in the virtual machine operation domain to which the logical channel is bound. In an operating system under a resource-constrained environment, the number of logical channels is limited, so there is no need to consume a large amount of storage space to record the above description information, thereby saving storage space. In addition, when an application program accesses data and code, the virtual machine operation domain can be used to check whether it complies with the access policy, without having to read the data content of the application data required to access, thereby avoiding the risk of data leakage.
[0079] On the basis of the above embodiments, according to the virtual machine operation domain, controlling the target application to perform secure access to data during operation may include:
[0080] When it is determined according to the virtual machine operation domain that the module data set data to be accessed by the target application belongs to the application module to which the target application belongs, allowing the target application to access the module data set data;
[0081] When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application does not belong to the application module to which the target application belongs, the target application is prohibited from accessing the module data set data.
[0082] In this embodiment, the module data set can be set as data that all applications of the same module are allowed to access. Furthermore, when it is determined that the application module identifier of the data to be accessed is consistent with the application module identifier of the target application module, it can be directly determined that the target application is allowed to access the module data set data.
[0083] Figure 3 A flowchart of another method for secure access to an application provided in an embodiment of the present invention. This embodiment is optimized based on the above embodiments. In this embodiment, for the situation where the target application's required access data is module data set data belonging to a module data set, the operation of "controlling the target application's secure access to data during operation according to the virtual machine operation domain" is concretized.
[0084] Correspondingly, such as Figure 3 As shown, the method includes:
[0085] S310. When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written into the virtual machine execution domain corresponding to the target logical channel.
[0086] S320: When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application does not belong to the application module to which the target application belongs, prohibiting the target application from accessing the module data set data.
[0087] In this embodiment, it is pre-defined that an application module should not be allowed to access module data sets of other application modules across virtual machine operation domains, that is, different application modules cannot access each other's module data set data.
[0088] In this embodiment, the type data belonging to each application module is stored in the volatile memory or non-volatile memory of the resource-constrained device according to a preset data storage rule.
[0089] Accordingly, after obtaining the memory address of the data to be accessed by the target application, the application module to which the data to be accessed belongs and the type of data to be accessed can be obtained accordingly. Furthermore, when obtaining that the data to be accessed by the target application belongs to the module data set data and obtaining the application module identifier corresponding to the data to be accessed accordingly, the application module identifier corresponding to the data to be accessed can be compared with the application module identifier of the application module to which the target application belongs written in the virtual machine running domain. If the two are inconsistent, the target application is prohibited from accessing the module data set data.
[0090] Furthermore, if the two are consistent, the target application is allowed to access the module data set data.
[0091] S330. When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application is the module global data or local data belonging to the target application module to which the target application belongs, if the module data set data belongs to other applications in the target application module that are different from the target application, the target application is prohibited from accessing the module data set data.
[0092] Furthermore, when it is determined based on the virtual machine running domain that the module data set data to be accessed by the target application is application module reference domain data belonging to the target application module to which the target application belongs, if the module data set data belongs to other applications in the target application module that are different from the target application, the target application is prohibited from accessing the module data set data.
[0093] In this embodiment, it is further defined that: module global data is independently allocated on different logical channels. Since different applications of the same application module can only be run successively on the same logical channel, in this case, the module global data is allocated at the runtime of the application and the allocated module global data is reclaimed at the runtime. Different applications cannot access this data from each other.
[0094] Local data is allocated in the virtual machine stack as the function is called during the application runtime. The virtual machine stack is automatically recycled after the function is executed. Therefore, different applications cannot access each other's local data. Reference domain data is created when the application is installed. Regardless of whether it belongs to the same application module, different applications cannot access each other's reference domain data.
[0095] Similarly, after the data to be accessed by the target application is module data set data, it is necessary to further obtain the application module identifier and application identifier of the data to be accessed, and correspondingly query and obtain the application module identifier of the target application module and the application identifier of the target application from the virtual machine running domain.
[0096] As described above, when it is determined that the application module identifier of the data to be accessed is consistent with the application module identifier of the target application module, it can be directly determined that the target application is allowed to access the module data set data.
[0097] In an optional implementation of the present embodiment, in order to ensure the data security of the module data set to the greatest extent, after determining that the application module identifier of the data to be accessed is consistent with the application module identifier of the target application module, the target application is optionally allowed to access the module data set data only when it is determined that the application identifier of the data to be accessed is the same as the application identifier of the target application; otherwise, the target application is prohibited from accessing the module data set data.
[0098] That is, when the application module identifier of the data to be accessed is inconsistent with the application module identifier of the target application module, or when the application module identifier of the data to be accessed is consistent with the application module identifier of the target application module, but the application identifier of the data to be accessed is inconsistent with the application identifier of the target application, the target application is prohibited from accessing the module data set data.
[0099] S340: When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application belongs to the module read-only data of the application module to which the target application belongs, the target application is allowed to access the module data set data.
[0100] Further, when it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application belongs to the application module domain data of the application module to which the target application belongs, the target application is allowed to access the module data set data.
[0101] For module read-only data and module domain data, different applications of the same application module can access them, but other applications of different application modules cannot access them.
[0102] The technical solution of the embodiment of the present invention implements logical security isolation on the application module by using the virtual machine running domain to define the security access control policy of the module data set, thereby achieving the purpose of protecting the sensitive data of the application.
[0103] Figure 4 A flowchart of another method for secure access to applications provided by an embodiment of the present invention. This embodiment is optimized based on the above embodiments. In this embodiment, in view of the situation that the target application needs to access data that is application module assembly data belonging to the application module assembly, the operation of "controlling the target application to securely access data during operation according to the virtual machine operation domain" is concretized.
[0104] Correspondingly, such as Figure 4 As shown, the method includes:
[0105] S410. When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written into the virtual machine execution domain corresponding to the target logical channel.
[0106] S420. When it is determined according to the virtual machine running domain that the module assembly data to be accessed by the target application belongs to the target library module, after switching to write the description information of the permission access data matching the target library module in the virtual machine running domain corresponding to the target logical channel, the access to the module assembly data is executed in the target logical channel.
[0107] In this embodiment, the module assembly refers to the program code of the module, including the library module assembly and the application module assembly.
[0108] The module assembly security access policy is divided into two cases:
[0109] 1. When the interface is exported, the program code in the module assembly of the library module should be allowed to be called unconditionally by other library modules or application modules, and vice versa;
[0110] 2. When the interface is not exported, the module assembly of the application module should not allow other application modules or library modules to call it; when the interface is exported, it should be accessed only after obtaining the interface authorization of the server application.
[0111] In addition, the virtual machine operation domain security policy should provide a protection mechanism to limit the malicious code module from accessing application sensitive data. When a malicious code module is illegally forced to be loaded into the embedded operating system, the module should only be able to access the application data set it created.
[0112] In this embodiment, after determining that the data to be accessed is module assembly data and that the module assembly data belongs to a library module, it is detected whether the interface of the library module is exported. If the library module belongs to a target library module whose interface is exported, the description information of the permission access data matching the target library module can be switched to be written in the virtual machine running domain corresponding to the target logical channel, and then, in the target logical channel, access to the module assembly data can be executed.
[0113] That is, when the module assembly interface of the library module is called, the module data set and module assembly in the virtual machine execution domain should be switched to the module data set and module assembly of the library module.
[0114] After the switching of the virtual machine running domain is completed, the module assembly data in the target library module can be accessed in the target logical channel.
[0115] S430. When it is determined according to the virtual machine running domain that the module assembly data to be accessed by the target application is the application interface authorized to be called by the target application, after switching to write the description information of the permission access data matching the application interface in the virtual machine running domain corresponding to the target logical channel, the access to the module assembly data is executed in the target logical channel.
[0116] In this embodiment, when it is determined that the data to be accessed is module assembly data, and the module assembly data is application module assembly data, it means that it is expected to call the application interface in the application module. At this time, access to the module assembly data to be accessed is only allowed when it is guaranteed that the module assembly data to be accessed is the application interface authorized to be called by the target application.
[0117] Specifically, in the virtual machine running domain, the authorization information of each application interface authorized to be called by the target application is recorded. By querying the virtual machine running domain, it can be determined whether the module assembly data to be accessed by the target application is the application interface authorized to be called by the target application. If not, access to the module assembly data to be accessed can be directly denied.
[0118] When calling the interface of the module assembly of the application module, which is the server-side authorization interface, the runtime environment should switch the module assembly, module data set and application data set in the virtual machine running domain to the module assembly, module data set and application data set of the server (that is, the application to which the application interface authorized to be called belongs).
[0119] The technical solution of the embodiment of the present invention implements logical security isolation on the application module by using the security access control policy of the virtual machine running domain definition module assembly, thereby achieving the purpose of protecting application sensitive data.
[0120] On the basis of the above embodiments, according to the virtual machine operation domain, controlling the target application to perform secure access to data during operation may also include:
[0121] When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application belongs to the application module to which the target application belongs, allowing the target application to access the module data set data;
[0122] When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application does not belong to the application module to which the target application belongs, the target application is prohibited from accessing the module data set data.
[0123] In this optional implementation, defining the application data set security access control policy is divided into two cases:
[0124] 1. Application data security access policy between applications created by different application modules:
[0125] 1) Application data sets should not be allowed to access each other;
[0126] 2) During application programming, the application data set of the application module should not be exported to other modules for access and call. For example, if an application data set is exported to an external entity through non-programming means and then input into an application created by another application module, the virtual machine running domain should restrict access to the application data set.
[0127] 2. Security access policy between applications created by the same application module:
[0128] 1) The module data sets and module assemblies of the application should be shared;
[0129] 2) Application data sets should be accessible to each other.
[0130] The above implementation method uses the virtual machine running domain to define the security access control policy of the application data set, implements logical security isolation on the application module, and thus achieves the purpose of protecting the sensitive data of the application.
[0131] Figure 5 A flowchart of another method for secure access to applications provided by an embodiment of the present invention. This embodiment is optimized based on the above embodiments. In this embodiment, for the situation where the target application needs to access data that is application data set data belonging to the application data set, the operation of "controlling the target application to securely access data during operation according to the virtual machine operation domain" is concretized.
[0132] Correspondingly, such as Figure 5 As shown, the method includes:
[0133] S510. When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written into the virtual machine execution domain corresponding to the target logical channel.
[0134] S520: When it is determined according to the virtual machine operation domain that the application data set to be accessed by the target application contains data characteristics of cross-domain data, the target application is allowed to access the application data set.
[0135] In this embodiment, the data to be accessed by the target application is further divided into application data set data containing data features of cross-domain data and application data set data not containing data features of cross-domain data.
[0136] Specifically, the virtual machine operation domain may be queried to determine whether the application data set to be accessed contains data features of cross-domain data. For example, the memory addresses of all data containing data features of cross-domain data may be recorded in the virtual machine operation domain.
[0137] Alternatively, during the process of querying the data type of the data to be accessed through the memory address of the data to be accessed, it is also possible to determine whether the application data set data to be accessed contains data features of cross-domain data based on the storage location of the data to be accessed.
[0138] In this embodiment, if the application data set data to be accessed by the target application contains data features of cross-domain data, the application data set data can be accessed across application modules; otherwise, only applications belonging to the same application module can share access to the application data set data.
[0139] S530. When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application does not contain data features of cross-domain data, if it is determined that the application data set data belongs to an application module different from the target application, the target application is prohibited from accessing the application data set data.
[0140] S540: When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application does not contain a cross-domain data feature, if the application data set data belongs to an application module to which the target application belongs, the target application is allowed to access the application data set data.
[0141] The technical solution of the embodiment of the present invention implements logical security isolation on the application module by using the virtual machine running domain to define the security access control policy of the application data set, thereby achieving the purpose of protecting sensitive application data.
[0142] Figure 6A flowchart of another method for secure access to an application provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned embodiments. In this embodiment, a matching security access control policy is selected for different situations of the data to be accessed, and secure access control is performed on the data to be accessed. Specifically, the operation of "controlling the target application to securely access data during operation according to the virtual machine operation domain" is concretized as follows: during the operation of the target application, identifying the data type of the application data to be accessed by the target application and the address description information of the application data; controlling the target application to securely access data during operation according to the data type and address description information of the application data and the memory address range recorded in the virtual machine operation domain.
[0143] Correspondingly, such as Figure 6 As shown, the method specifically includes:
[0144] S610: When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written into the virtual machine execution domain corresponding to the target logical channel.
[0145] S620: During the running of the target application, identify the data type of the application data to be accessed by the target application and the address description information of the application data.
[0146] The address description information of the application data may be a memory address of the application data. Based on the memory address, the data type of the application data to be accessed by the target application program may be determined.
[0147] S630. Detect the data type of the application data: if the data type is global data, execute S640; if the data type is local data, execute S6100.
[0148] Among them, global data can be understood as the global variables and other data required to be used by each application in the embedded operating system during execution. The above global data is stored in the memory area of the restricted device. For example, global data can be stored in the global data area, and local data can be stored in the indirect access variable stack. When the program runs and calls a function, the indirect access variable stack data memory is allocated, and when the function is exited, the indirect access variable stack data memory is reclaimed.
[0149] The global data area is used to store various global variables generated by each application during its operation, and the variable stack is indirectly accessed to store various local variables generated by each application during its operation.
[0150] In an optional implementation of this embodiment, access control to non-pointer type module data may include:
[0151] 1. Access control of local variables
[0152] Access to local variables stored in the virtual machine stack should only be performed in the form of variable indexes, and must not exceed the local variable stack variable index range.
[0153] 2. Access control of indirect access to variable stack
[0154] 1) When accessing indirect variable stack data, check that it does not exceed its overall boundary range.
[0155] 2) When accessing across running domains, access permissions should be checked.
[0156] 3. Access control of global data
[0157] 1) When accessing module global data, ensure that the memory boundary of the currently accessed data type is not exceeded;
[0158] 2) When accessing module reference domain data, it should only be accessed with a 4-byte aligned address and cross-run domain access is not allowed;
[0159] 3) Access permissions must be checked when module read-only variables and module global data are accessed across runtime domains.
[0160] In another optional implementation of this embodiment, the access control of pointer type module data may include:
[0161] 1. Pointer access control for global data
[0162] When accessing the global data memory area through a pointer, you should check whether the pointer accesses the memory within the virtual machine running domain to ensure that the application cannot access the memory data of other module running domains through the pointer.
[0163] 2. Pointer access control for indirect access to variable stack
[0164] When indirectly accessing the variable stack through pointer access, it should be checked that the pointer access memory does not exceed the overall boundary range of the indirectly accessed variable stack, and the access rights should be checked when accessing across execution domains.
[0165] 3. Pointer access control for module read-only data, module global data, and module reference domain data
[0166] 1) It should be ensured that the memory boundary of the currently accessed variable type cannot be exceeded;
[0167] 2) Module reference variables can only be accessed with 4-byte aligned addresses and are not allowed to be accessed across runtime domains;
[0168] 3) Access permissions must be checked when module read-only variables and module global variables are accessed across execution domains.
[0169] S640, detecting whether the global data is pointer data: if it is non-pointer global data, executing S650; if it is pointer global data, executing S690.
[0170] Among them, pointer type data means that the data stored is the memory address of the data, while non-pointer type data means that the data is the actual data itself.
[0171] S650. Locate the application data memory address matching the address description information in the memory area, and execute S660.
[0172] S660. Detect whether the memory address of the application data matches the memory address range recorded in the virtual machine running domain: if so, execute S670; otherwise, execute S680.
[0173] S670: Allow the target application to access the application data.
[0174] S680: Do not allow the target application to access the application data.
[0175] S690. Locate a memory interval corresponding to the subdivided data type of the application data in the memory area, and locate the application data memory address matching the address description information in the memory interval, and execute S660.
[0176] Specifically, the memory interval corresponding to the module reference domain data can be first located in the memory area, and it can be detected whether the memory interval stores the application data memory address matching the address description information: if so, the application data memory address of the application data is obtained from the memory interval corresponding to the module reference domain data; otherwise, the memory interval corresponding to the temporary data (including: temporary static variable data and temporary dynamic variable data) can be continuously located in the memory area, and it can be detected whether the memory interval stores the application data memory address matching the address description information: if so, the application data memory address of the application data is obtained from the memory interval corresponding to the temporary data; otherwise, the memory interval corresponding to the persistent data can be continuously located in the memory area, and it can be detected whether the memory interval stores the application data memory address matching the address description information: if so, the application data memory address of the application data is obtained from the memory interval corresponding to the persistent data; otherwise, a data access exception is thrown to prohibit the target application from accessing the application data.
[0177] S6100, check whether the local type data is pointer type data: if it is non-pointer type local type data, execute S6110; if it is pointer type local type data, execute S6150.
[0178] S6110. Locate the application data variable stack address that matches the memory address description information in the indirect access variable stack, and execute S6120.
[0179] S6120. Detect whether the application data variable stack address matches the memory address range recorded in the virtual machine running domain: if so, execute S6130; otherwise, execute S6140.
[0180] S6130. Allow the target application to access the application data.
[0181] S6140: Do not allow the target application to access the application data.
[0182] S6150. Locate a variable stack interval corresponding to the subdivided data type of the application data in the indirect access variable stack, and locate an application data variable stack address matching the address description information in the variable stack interval, and execute S6120.
[0183] The technical solution of the embodiment of the present invention reasonably and clearly classifies the data in the application running process, creates an independent virtual memory space and access policy for the virtual machine running domain on each logical channel, and in the operating system under the resource-constrained environment, the number of logical channels is limited, so there is no need to spend a lot of storage space to record the module unique identifier, thereby saving storage space. When accessing data and code, it can be checked whether it complies with the access policy based on the memory address and the virtual machine running domain, without reading the data content of the application data, avoiding the risk of data leakage.
[0184] Figure 7 A schematic diagram of a secure access device for an application provided by an embodiment of the present invention. A runtime environment configured in an embedded operating system, wherein the embedded operating system is installed in a restricted device. Figure 7 As shown, the device includes: a description information writing module 710 and a security access control module 720, wherein:
[0185] A description information writing module 710 is used to write description information of the target application program's permission to access data in a virtual machine running domain corresponding to the target logical channel when the target application program is activated and running in the target logical channel;
[0186] The security access control module 720 is used to control the target application program's secure access to data during operation according to the virtual machine operation domain.
[0187] The technical solution of the embodiment of the present invention can control the secure access to data during the operation of the application program based on the description information of the permitted access data by independently writing the description information of the data that is permitted to be accessed by the application program activated and running in the logical channel in the virtual machine operation domain to which the logical channel is bound. In an operating system under a resource-constrained environment, the number of logical channels is limited, so there is no need to consume a large amount of storage space to record the above description information, thereby saving storage space. In addition, when an application program accesses data and code, the virtual machine operation domain can be used to check whether it complies with the access policy, without having to read the data content of the application data required to access, thereby avoiding the risk of data leakage.
[0188] Based on the above embodiments, the description information of the permitted access data may include at least one of the following:
[0189] The storage address range of the permitted access data, the identifier of the permitted access data, and the data characteristics of the permitted access data.
[0190] Based on the above embodiments, the identifier of the permitted access data includes at least one of the following: an application module identifier, an application program identifier, and a logical channel identifier;
[0191] The data characteristics of the permitted access data include: whether it is cross-domain data.
[0192] Based on the above embodiments, the types of the permitted access data include:
[0193] Module datasets, module assembly datasets, and application datasets.
[0194] Based on the above embodiments, the module data set includes: global data and local data;
[0195] The global data includes at least one of the following: module read-only data and module global data;
[0196] The local data includes at least one of the following: local structure type data, local basic type data and function parameter data.
[0197] Based on the above embodiments, the module read-only data is stored in a memory area of a non-volatile memory in a restricted device; the module global data is stored in a memory area of a volatile memory in a restricted device; and
[0198] Local structure type data, local basic type data and function parameter data are all stored in an indirect access variable stack in the volatile memory.
[0199] Based on the above embodiments, the application data set includes at least one of the following:
[0200] Temporary static variable data, temporary dynamic variable data, and persistent data;
[0201] The temporary static variable data includes data characteristics of whether it is cross-domain data.
[0202] Based on the above embodiments, the persistent data is stored in a memory area of a non-volatile memory in a restricted device;
[0203] The contents of the temporary static variable data and the temporary dynamic variable data are stored in a memory area of a volatile memory in the restricted device.
[0204] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0205] When it is determined according to the virtual machine operation domain that the module data set data to be accessed by the target application does not belong to the application module to which the target application belongs, prohibiting the target application from accessing the module data set data;
[0206] When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application belongs to the application module to which the target application belongs, the target application is allowed to access the module data set data.
[0207] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0208] When it is determined based on the virtual machine running domain that the module data set data to be accessed by the target application is the module global data or local data belonging to the target application module to which the target application belongs, if the module data set data belongs to other applications in the target application module that are different from the target application, the target application is prohibited from accessing the module data set data.
[0209] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0210] When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application is module read-only data belonging to an application module to which the target application belongs, the target application is allowed to access the module data set data.
[0211] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0212] When it is determined that the module assembly data to be accessed by the target application belongs to the target library module based on the virtual machine running domain, after switching to write the description information of the permission access data matching the target library module in the virtual machine running domain corresponding to the target logical channel, the access to the module assembly data is executed in the target logical channel.
[0213] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0214] When it is determined based on the virtual machine running domain that the module assembly data to be accessed by the target application is the application interface authorized to be called by the target application, after switching to write the description information of the permission access data matching the application interface in the virtual machine running domain corresponding to the target logical channel, the access to the module assembly data is executed in the target logical channel.
[0215] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0216] When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application belongs to the application module to which the target application belongs, allowing the target application to access the module data set data;
[0217] When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application does not belong to the application module to which the target application belongs, the target application is prohibited from accessing the module data set data.
[0218] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0219] When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application contains data characteristics of cross-domain data, the target application is allowed to access the application data set data.
[0220] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0221] When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application does not contain data features of cross-domain data, if it is determined that the application data set data belongs to an application module different from the target application, the target application is prohibited from accessing the application data set data.
[0222] Based on the above embodiments, the security access control module 720 can be specifically used for:
[0223] When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application does not contain cross-domain data features, if the application data set data belongs to an application module to which the target application belongs, the target application is allowed to access the application data set data.
[0224] Based on the above embodiments, the security access control module 720 may specifically include:
[0225] An address description information identification unit, used to identify the data type of application data to be accessed by the target application and the address description information of the application data during the operation of the target application;
[0226] The virtual machine control unit is used to control the target application program to perform secure access to data during operation according to the data type and address description information of the application data and the memory address range recorded in the virtual machine operation domain.
[0227] Based on the above embodiments, the virtual machine control unit can be specifically used for:
[0228] If it is determined that the data type of the application data is non-pointer type global data, locating the application data memory address matching the address description information in the memory area;
[0229] Detecting whether the application data memory address matches the memory address range recorded in the virtual machine operation domain;
[0230] If so, the target application is allowed to access the application data; otherwise, the target application is not allowed to access the application data.
[0231] Based on the above embodiments, the virtual machine control unit can be specifically used for:
[0232] If it is determined that the data type of the application data is pointer-type global data, locating a memory interval corresponding to the subdivided data type of the application data in the memory area;
[0233] In the memory interval, locate the application data memory address matching the address description information;
[0234] Detecting whether the application data memory address matches the memory address range recorded in the virtual machine operation domain;
[0235] If so, the target application is allowed to access the application data; otherwise, the target application is not allowed to access the application data.
[0236] Based on the above embodiments, the virtual machine control unit can be specifically used for:
[0237] If it is determined that the data type of the application data is non-pointer local data, locating the application data variable stack address that matches the memory address description information in the indirect access variable stack;
[0238] Detecting whether the application data variable stack address matches the memory address range recorded in the virtual machine running domain;
[0239] If so, the target application is allowed to access the application data; otherwise, the target application is not allowed to access the application data.
[0240] Based on the above embodiments, the virtual machine control unit can be specifically used for:
[0241] If it is determined that the data type of the application data is pointer-type local data, locating a variable stack interval corresponding to the subdivided data type of the application data in the indirect access variable stack;
[0242] In the variable stack interval, locate the application data variable stack address that matches the address description information;
[0243] Detecting whether the application data variable stack address matches the memory address range recorded in the virtual machine running domain;
[0244] If so, the target application is allowed to access the application data; otherwise, the target application is not allowed to access the application data.
[0245] The application security access device provided in the embodiment of the present invention can execute the application security access method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0246] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0247] Figure 8 A schematic diagram of the structure of a restricted device 10 that can be used to implement an embodiment of the present invention is shown.
[0248] like Figure 8As shown, the limited device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the limited device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0249] The I / O interface 15 in the restricted device 10 may include: eSPI (Enhanced Serial Peripheral Interface) and SPI (Serial Peripheral Interface), etc.
[0250] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, for example, executing a secure access method for an application as described in various embodiments of the present invention, which is executed by a runtime environment in an embedded operating system, and the embedded operating system is installed in a restricted device, and the method includes:
[0251] When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written in the virtual machine execution domain corresponding to the target logical channel;
[0252] According to the virtual machine operation domain, the target application is controlled to perform secure access to data during operation.
[0253] In some embodiments, a secure access method for an application as described in various embodiments of the present invention may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 16. In some embodiments, part or all of the computer program may be loaded and / or installed on the restricted device 10 via the ROM 12. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the secure access method for an application as described in various embodiments of the present invention described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute a secure access method for an application as described in various embodiments of the present invention in any other appropriate manner (e.g., by means of firmware).
[0254] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0255] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0256] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0257] Fig. 9 is a structural diagram of a terminal provided according to an embodiment of the present invention. Fig. 9 Said terminal includes the restricted device 910 as described in any embodiment of the present invention.
[0258] The restricted device can be understood as a resource-restricted device, which can generally be: a smart card, a USBKEY, an ESAM (Embedded Secure Access Module) or a SE (Secure Element), etc. The smart card is generally a multi-application smart card.
[0259] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
Claims
1. A method for securely accessing an application, characterized in that: The method is executed by a runtime environment in an embedded operating system installed in a restricted device, and includes: When the target application is activated and executed in the target logical channel, description information of the target application's permission to access data is written in the virtual machine execution domain corresponding to the target logical channel; According to the virtual machine operation domain, controlling the target application program to perform secure access to data during operation; The virtual machine running domain is a virtual memory space constructed by the runtime environment for the application program to run the permitted access data range. On each logical channel, there is one and only one running application program bound to the virtual machine running domain on the logical channel.
2. The method according to claim 1, characterized in that: The description information of the permitted access data includes at least one of the following: The storage address range of the permitted access data, the identifier of the permitted access data, and the data characteristics of the permitted access data.
3. The method according to claim 2, characterized in that The identification of the permission access data includes at least one of the following: an application module identification, an application program identification, and a logical channel identification; The data characteristics of the permitted access data include: whether it is cross-domain data.
4. The method according to claim 1, characterized in that: The types of permitted access data include: module data sets, module assembly sets, and application data sets; Module data sets include: global data and local data; The global data includes at least one of the following: module read-only data and module global data; The local data includes at least one of the following: local structure type data, local basic type data and function parameter data; The application data set includes at least one of the following: Temporary static variable data, temporary dynamic variable data, and persistent data; The temporary static variable data includes data characteristics of whether it is cross-domain data.
5. The method according to claim 4, characterized in that The module read-only data is stored in a memory area of a non-volatile memory in the restricted device; the module global data is stored in a memory area of a volatile memory in the restricted device; Local structure type data, local basic type data and function parameter data are all stored in an indirect access variable stack in the volatile memory; The persistent data is stored in a memory area of a non-volatile memory in the constrained device; The contents of the temporary static variable data and the temporary dynamic variable data are stored in a memory area of a volatile memory in the restricted device.
6. The method according to claim 4, characterized in that According to the virtual machine operation domain, control the target application program to perform secure access to data during operation, including: When it is determined according to the virtual machine operation domain that the module data set data to be accessed by the target application does not belong to the application module to which the target application belongs, prohibiting the target application from accessing the module data set data; When it is determined according to the virtual machine running domain that the module data set data to be accessed by the target application belongs to the application module to which the target application belongs, the target application is allowed to access the module data set data.
7. The method according to claim 4, characterized in that According to the virtual machine operation domain, control the target application program to perform secure access to data during operation, including: When it is determined according to the virtual machine running domain that the module assembly data to be accessed by the target application belongs to the target library module, after switching and writing the description information of the permission access data matching the target library module in the virtual machine running domain corresponding to the target logical channel, the module assembly data is accessed in the target logical channel; When it is determined based on the virtual machine running domain that the module assembly data to be accessed by the target application is the application interface authorized to be called by the target application, after switching to write the description information of the permission access data matching the application interface in the virtual machine running domain corresponding to the target logical channel, the access to the module assembly data is executed in the target logical channel.
8. The method according to claim 1, characterized in that According to the virtual machine operation domain, control the target application program to perform secure access to data during operation, including: When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application belongs to the application module to which the target application belongs, allowing the target application to access the module data set data; When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application does not belong to the application module to which the target application belongs, the target application is prohibited from accessing the module data set data.
9. The method according to claim 4, characterized in that According to the virtual machine operation domain, control the target application program to perform secure access to data during operation, including: When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application contains data characteristics of cross-domain data, allowing the target application to access the application data set data; When it is determined according to the virtual machine operation domain that the application data set data to be accessed by the target application does not contain data features of cross-domain data, if it is determined that the application data set data belongs to an application module different from that of the target application, the target application is prohibited from accessing the application data set data; When it is determined according to the virtual machine running domain that the application data set data to be accessed by the target application does not contain cross-domain data features, if the application data set data belongs to an application module to which the target application belongs, the target application is allowed to access the application data set data.
10. The method according to any one of claims 1 to 9, characterized in that: According to the virtual machine operation domain, control the target application program to perform secure access to data during operation, including: During the running process of the target application, identifying the data type of the application data to be accessed by the target application and the address description information of the application data; According to the data type and address description information of the application data and the memory address range recorded in the virtual machine operation domain, the target application is controlled to perform secure access to data during operation.
Citation Information
Patent Citations
Data management method and system, electronic equipment and medium
CN116070201A
Application program running method and operating system thereof
CN116107668A
Data processing method and device
CN116755845A
Secure cross-domain communication method and system based on message mechanism and vehicle
CN118353859A
System and method for attributing to a corresponding virtual machine CPU usage of an isolated driver domain in which a shared resource's device driver resides
US20060200821A1
