A network transmission privacy protection method and system for a distributed system
By maintaining the node list in the distributed system and using the Netlink protocol to broadcast list change information, the problem of delay and leakage of data privacy protection in the distributed cluster is solved, and delay-free packet judgment and security domain protection in the kernel are achieved.
Patent Information
- Application Number
- CN202311764252.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-12-20
AI Technical Summary
Existing privacy computing technology is difficult to effectively protect the privacy of data in distributed clusters such as federated learning, especially to prevent data leakage when bandwidth between nodes is precious and the kernel cannot tolerate delays.
By creating a local node list in the kernel of each node in the distributed system, recording the set of security domains read by each process, and using the Netlink protocol to broadcast list change information between nodes to ensure that when receiving data packets, it is determined whether they are within the security domain. , to avoid illegal copying and leakage.
It realizes the judgment of whether the data packet is in the security domain without delay in the kernel, prevents the device from leaking the content of the security domain through network transmission, and ensures the protection of data privacy.
Smart Images

Figure CN117749489B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer networks, and in particular relates to a network transmission privacy protection method and system for a distributed system. Background Art
[0002] Application No. 202311241074.X "A method for controllable use of data" provides a new paradigm for privacy computing, that is, the storage logical partitions in the storage / computing nodes of the data user are divided into security domains controlled by the data provider, ensuring that private data can only be processed in the security domain and cannot flow out of the security domain. This ensures that although the private data of the data provider is visible to the data user, it prevents the data user from copying the private data out of the security domain in various ways for secondary sales. This solution can run properly in a single machine, ensuring that no process can violate restrictions and illegally copy data, but it is not applicable to distributed clusters such as federated learning.
[0003] A distributed cluster includes multiple nodes, and the bandwidth between nodes is a very valuable resource. The cores of different nodes cannot tolerate any delays. Therefore, the applicant considers how to design a network transmission privacy protection method and system for a distributed system, which can avoid devices from transmitting or leaking security domain content through the network while meeting the condition of no kernel delay. Summary of the invention
[0004] In view of the defects in the prior art, the present invention provides a network transmission privacy protection method and system for a distributed system, which can prevent devices from transmitting or leaking security domain content through the network while meeting the condition of no kernel delay.
[0005] In a first aspect, a network transmission privacy protection method for a distributed system includes:
[0006] The kernel of each node creates a local node list; the node list includes all processes in the distributed system and the set of security domains that each process has read;
[0007] After receiving a data packet, the kernel obtains the process corresponding to the data packet to obtain the other party process. Based on the other party process, it queries the local node list to obtain the security domain set read by the other party process, and allows or denies the other party process to receive the data packet based on the security domain set.
[0008] Furthermore, it also includes:
[0009] When the kernel detects that the local node list has changed, it obtains the list change information and notifies the upper-layer application of the node through Netlink.
[0010] The upper-layer application broadcasts list change information to other nodes in the distributed system;
[0011] When the upper-layer application receives list change information broadcast by other nodes, it notifies the kernel of the node where it is located through Netlink.
[0012] When the kernel receives list change information from the upper-layer application of the node, it updates the local node list according to the list change information.
[0013] Furthermore, the node list identifies the process by the node IP address and the port number called by the process;
[0014] The security domain set includes the security domain IDs corresponding to the security domains that the process has read.
[0015] Furthermore, the upper layer application broadcasts list change information to other nodes specifically including:
[0016] After receiving the list change information, the upper-layer application parses the security domain ID in the list change information, converts the security domain ID into the corresponding public key, and broadcasts the converted list change information to other nodes; the public key is used to uniquely identify the security domain.
[0017] Furthermore, when the upper-layer application receives the list change information broadcast by other nodes, it notifies the kernel of the node where it is located through Netlink, specifically including:
[0018] When the upper-layer application receives the list change information broadcast by other nodes, it parses the public key in the list change information, converts the public key into the corresponding security domain ID, and then notifies the kernel of the node through Netlink of the converted list change information.
[0019] Furthermore, changes to the node list include creating, updating, and deleting entries in the security domain set that the process has read.
[0020] In a second aspect, a network transmission privacy protection system for a distributed system, the distributed system includes a plurality of nodes, each node includes a kernel;
[0021] The kernel is used to create a local node list; the node list includes all processes in the distributed system and the set of security domains that each process has read; the kernel is also used to obtain the process corresponding to the data packet after receiving the data packet, in order to obtain the other party's process, query the local node list based on the other party's process to obtain the set of security domains that the other party's process has read, and allow or deny the process to receive the data packet based on the security domain set.
[0022] Furthermore, each node also includes an upper layer application;
[0023] The kernel is also used to obtain list change information when detecting changes in the local node list, and notify the upper-layer application of the node through Netlink. The kernel is also used to update the local node list according to the list change information when receiving list change information from the upper-layer application of the node.
[0024] The upper-layer application is used to broadcast list change information to other nodes in the distributed system; when receiving list change information broadcast by other nodes, the list change information is notified to the kernel of the node through Netlink.
[0025] Furthermore, the node list identifies the process by the node IP address and the port number called by the process;
[0026] The security domain set includes the security domain IDs corresponding to the security domains that the process has read.
[0027] Furthermore, the upper layer application is specifically used to: after receiving the list change information, parse out the security domain ID in the list change information, convert the security domain ID into a corresponding public key, and broadcast the converted list change information to other nodes; wherein the public key is used to uniquely identify the security domain;
[0028] The upper-layer application is specifically used to: when receiving list change information broadcast by other nodes, parse the public key in the list change information, convert the public key into the corresponding security domain ID, and then notify the kernel of the node through Netlink of the converted list change information.
[0029] It can be seen from the above technical solutions that the network transmission privacy protection method and system of the distributed system provided by the present invention, the kernel has all the information to determine whether the data packet is received by the local process at any time, shortening the delay caused by the kernel judgment process, and can meet the kernel's requirement of no delay. Secondly, when the node receives a data packet, the kernel needs to determine whether the local process can receive the data packet, which can prevent the device from transmitting or leaking the security domain content through the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0031] Figure 1 A flowchart of a network transmission privacy protection method provided in an embodiment.
[0032] Figure 2 A schematic diagram of broadcasting when a node list is changed provided in an embodiment.
[0033] Figure 3 A flowchart of a node list updating method provided in an embodiment. DETAILED DESCRIPTION
[0034] The embodiments of the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and are therefore only used as examples, and the protection scope of the present invention cannot be limited thereto. It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should be the common meanings understood by those skilled in the art to which the present invention belongs.
[0035] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0036] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0037] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0038] Example:
[0039] A network transmission privacy protection method for distributed systems, see Figure 1 ,include:
[0040] The kernel of each node creates a local node list; the node list includes all processes in the distributed system and the set of security domains that each process has read;
[0041] After receiving a data packet, the kernel obtains the process corresponding to the data packet to obtain the other party process, queries the local node list based on the other party process to obtain the security domain set read by the other party process, and allows or denies the local process to receive the data packet based on the security domain set.
[0042] In this embodiment, the kernel of each node creates a node list and maintains the set of security domains that each process has read. Each process that has read the security domain will have certain restrictions on using the socket, mainly in that when receiving a data packet, a verification is required to ensure whether the local process can receive the data packet.
[0043] In this embodiment, when each data packet arrives at a node, the LSM framework intercepts the data packet before the data packet notifies the upper-layer application. At this time, the kernel will obtain the peer IP and port number of the data packet to obtain the other party's process. Then, the corresponding entry is searched in the local node list to obtain the security domain set that the other party's process has read, and the process is allowed or denied to receive the data packet based on the security domain set. For example, since the data packet may contain information in any security domain read by the other party's process, if the local process has read and written a security domain, the received data packet may contain data outside this security domain, and the local process refuses to receive the data packet, which can prevent the process from writing data in the data packet to different security domains. For example, data packets that the local process cannot receive due to read and write restrictions are intercepted. For some data packets that can be read but need to be recorded, the corresponding security domain information is recorded in the task_struct of the local process for subsequent judgment. Processes that have not read the security domain will be passed directly.
[0044] In this network transmission privacy protection method, the kernel has all the information to determine whether the data packet is received by the local process at any time, which shortens the delay caused by the kernel judgment process and can meet the kernel's requirement of no delay. Secondly, when the node receives the data packet, the kernel needs to determine whether the local process can receive the data packet, which can prevent the device from transmitting or leaking the security domain content through the network.
[0045] Further, in some embodiments, see Figure 2 , also includes:
[0046] When the kernel detects that the local node list has changed, it obtains the list change information and notifies the upper-layer application of the node through Netlink.
[0047] The upper-layer application broadcasts list change information to other nodes in the distributed system;
[0048] When the upper-layer application receives list change information broadcast by other nodes, it notifies the kernel of the node where it is located through Netlink.
[0049] When the kernel receives list change information from the upper-layer application of the node, it updates the local node list according to the list change information.
[0050] In this embodiment, the upper layer application of the distributed system is mainly the guard module. The guard module includes DvAgent and DvServer. In general, the guard module and the kernel of the distributed system need to maintain the data they need and run independently. The interaction between the guard module and the kernel is realized through system calls. These system calls are generally for changing the behavior of the security domain or the behavior of the whitelist, and this type of system call is expensive. If frequent interaction is required between the kernel and the guard module, the existing system call method cannot meet the system overhead requirements. In order to solve the problem of high cost of existing system calls, the network transmission privacy protection method selects Netlink as the data interaction method between the guard module and the kernel. Netlink coding is simple, does not require the use of additional structures, and can also use the system call of the socket function cluster. Netlink can share the same IO multiplexing interface with other file handles, whether shared memory, TCP or UDP. Netlink occupies less resources. Compared with other methods that require frequent switching of management states or frequent reading and writing of physical files, Netlink only needs to occupy one port on the basis of VFS.
[0051] In this embodiment, if the security domain read by a node process changes, the local node list can be modified directly. In order to let other nodes in the distributed cluster know the change of the node, the kernel of the change needs to notify the DvAgent of the change, and the DvAgent broadcasts the change to all other nodes. In this way, after receiving the message, the DvAgent of any node notifies the kernel of the list change information, and the kernel updates the local node list according to the list change information, ensuring the consistency of the node list of each node in the entire distributed cluster and ensuring that the node list of each node is up to date.
[0052] Further, in some embodiments, the node list identifies the process by the node IP address and the port number called by the process;
[0053] The security domain set includes the security domain IDs corresponding to the security domains that the process has read.
[0054] In this embodiment, since Netlink is not only a function that uses a socket cluster, its actual function call chain is also similar to TCP and UDP. Therefore, the transmission mode of Netlink is also streaming data transmission. When sending or receiving data through Netlink, the data needs to be serialized and deserialized. The network transmission privacy protection method uses the node IP address and the port number called by the process to identify the process. The network transmission privacy protection method constructs a structure according to each process and the corresponding security domain set. The serialization and deserialization of the structure applies the following C language features: the structure has no corresponding fields in the memory, and all fields are obtained through the defined fixed byte offset, so the first pointer and size of the structure can be directly copied into the buffer and sent through Netlink. When the Netlink data packet is received, the first address is taken out and then converted into the corresponding structure.
[0055] Further, in some embodiments, see Figure 3 , the upper-layer application broadcasts list change information to other nodes, including:
[0056] After receiving the list change information, the upper-layer application parses the security domain ID in the list change information, converts the security domain ID into the corresponding public key, and broadcasts the converted list change information to other nodes; the public key is used to uniquely identify the security domain.
[0057] In this embodiment, for a distributed system, the security domain IDs between different nodes cannot uniquely identify the same security domain. For example, even if the security domain IDs between different nodes are the same, it cannot be guaranteed that the two security domains are the same security domain. Therefore, after the upper-layer application receives the list change information, it parses the security domain ID in the list change information, maps the security domain ID to a public key that can uniquely identify different security domains. Before DvAgent adds a security domain, DvServer needs to obtain authorization from the data provider to obtain a public key that uniquely identifies the security domain. DvAgent is used to maintain the mapping relationship between the security domain ID and the public key in the security domain.
[0058] Further, in some embodiments, see Figure 3 When the upper-layer application receives the list change information broadcast by other nodes, it notifies the kernel of the node where it is located through Netlink. The specific steps include:
[0059] When the upper-layer application receives the list change information broadcast by other nodes, it parses the public key in the list change information, converts the public key into the corresponding security domain ID, and then notifies the kernel of the node through Netlink of the converted list change information.
[0060] In this embodiment, when the upper-layer application receives list change information broadcast by other nodes, it parses the public key in the list change information and converts the public key into the corresponding security domain ID, so that the changed security domain data can be uniquely identified, ensuring the consistency of security domain data in the distributed cluster.
[0061] Further, in some embodiments, the change of the node list includes creating, updating, and deleting entries in the security domain set that the process has read.
[0062] In this embodiment, the changes in the node list mainly include three types: creating entries, updating entries, and deleting entries. The list change information includes the IP, the port number port called by the process, the security domain set, and the action on the security domain this time, where the action on the security domain includes creating, updating, or deleting entries. An entry is created when the process connects to the remote end or receives a new connection. An entry is updated when the process reads a file in a security domain that has not been read before. When the TCP connection is closed, that is, when the socket_shutdown hook function of the LSM framework is triggered, the entry is deleted.
[0063] A network transmission privacy protection system for a distributed system, the distributed system comprising a plurality of nodes, each node comprising a kernel;
[0064] The kernel is used to create a local node list; the node list includes all processes in the distributed system and the set of security domains that each process has read; the kernel is also used to obtain the process corresponding to the data packet after receiving the data packet, in order to obtain the other party's process, query the local node list based on the other party's process to obtain the set of security domains that the other party's process has read, and allow or deny the process to receive the data packet based on the security domain set.
[0065] Further, in some embodiments, each node also includes an upper layer application;
[0066] The kernel is also used to obtain list change information when detecting changes in the local node list, and notify the upper-layer application of the node through Netlink. The kernel is also used to update the local node list according to the list change information when receiving list change information from the upper-layer application of the node.
[0067] The upper-layer application is used to broadcast list change information to other nodes in the distributed system; when receiving list change information broadcast by other nodes, the list change information is notified to the kernel of the node through Netlink.
[0068] Further, in some embodiments, the node list identifies the process by the node IP address and the port number called by the process;
[0069] The security domain set includes the security domain IDs corresponding to the security domains that the process has read.
[0070] Further, in some embodiments, the upper layer application is specifically used to: after receiving the list change information, parse out the security domain ID in the list change information, convert the security domain ID into a corresponding public key, and broadcast the converted list change information to other nodes; wherein the public key is used to uniquely identify the security domain;
[0071] The upper-layer application is specifically used to: when receiving list change information broadcast by other nodes, parse the public key in the list change information, convert the public key into the corresponding security domain ID, and then notify the kernel of the node through Netlink of the converted list change information.
[0072] The system provided in the embodiment of the present invention is briefly described. For matters not mentioned in the embodiment part, reference may be made to the corresponding contents in the aforementioned embodiment.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A method for protecting network transmission privacy in a distributed system, characterized in that: include: The kernel of each node creates a local node list; the node list includes all processes in the distributed system and a set of security domains read by each process; After receiving the data packet, the kernel obtains the process corresponding to the data packet to obtain the other party process, queries the local node list according to the other party process to obtain the security domain set read by the other party process, and allows or denies the local process to receive the data packet according to the security domain set; Also includes: When the kernel detects that the local node list has changed, it obtains list change information and notifies the upper layer application of the node via Netlink of the list change information; The upper layer application broadcasts the list change information to other nodes in the distributed system; When the upper layer application receives the list change information broadcast by other nodes, it notifies the kernel of the node where it is located through Netlink. When the kernel receives list change information from the upper layer application of the node where it is located, it updates the local node list according to the list change information.
2. The method for protecting privacy in network transmission of a distributed system according to claim 1, characterized in that: The node list identifies the process by the node IP address and the port number called by the process; The security domain set includes the security domain IDs corresponding to the security domains read by the process.
3. The method for protecting privacy in network transmission of a distributed system according to claim 2, characterized in that: The upper layer application broadcasting the list change information to other nodes specifically includes: After receiving the list change information, the upper layer application parses the security domain ID in the list change information, converts the security domain ID into a corresponding public key, and broadcasts the converted list change information to other nodes; wherein the public key is used to uniquely identify the security domain.
4. The method for protecting privacy in network transmission of a distributed system according to claim 3, characterized in that: When the upper layer application receives the list change information broadcasted by other nodes, notifying the kernel of the node where the upper layer application is located of the list change information through Netlink specifically includes: When the upper-layer application receives the list change information broadcast by other nodes, it parses the public key in the list change information, converts the public key into the corresponding security domain ID, and then notifies the kernel of the node through Netlink of the converted list change information.
5. The method for protecting privacy in network transmission of a distributed system according to claim 1, characterized in that: Changes to the node list include creating, updating, and deleting entries in the security domain collection that the process has read.
6. A network transmission privacy protection system for a distributed system, the distributed system comprising a plurality of nodes, each node comprising a kernel; characterized in that: The kernel is used to create a local node list; the node list includes all processes in the distributed system and the security domain set read by each process; the kernel is also used to obtain the process corresponding to the data packet after receiving the data packet to obtain the other party process, query the local node list according to the other party process to obtain the security domain set read by the other party process, and allow or deny the local process to receive the data packet according to the security domain set; Each of the nodes also includes an upper layer application; The kernel is further used to obtain list change information when detecting a change in the local node list, and notify the upper layer application of the node through Netlink of the list change information; the kernel is further used to update the local node list according to the list change information when receiving the list change information from the upper layer application of the node; The upper layer application is used to broadcast the list change information to other nodes in the distributed system; when receiving the list change information broadcast by other nodes, the upper layer application notifies the kernel of the node where the list change information is located through Netlink.
7. The network transmission privacy protection system of the distributed system according to claim 6, characterized in that: The node list identifies the process by the node IP address and the port number called by the process; The security domain set includes the security domain IDs corresponding to the security domains read by the process.
8. The network transmission privacy protection system of the distributed system according to claim 7, characterized in that: The upper layer application is specifically used to: after receiving the list change information, parse out the security domain ID in the list change information, convert the security domain ID into a corresponding public key, and broadcast the converted list change information to other nodes; wherein the public key is used to uniquely identify the security domain; The upper layer application is specifically used for: when receiving list change information broadcasted by other nodes, parsing the public key in the list change information, converting the public key into a corresponding security domain ID, and notifying the kernel of the node through Netlink of the converted list change information.
Citation Information
Patent Citations
Method and device for enhancing security of application software
CN102254123A
Process isolation and encryption mechanism based security disc model and generation method thereof
CN104077244A
Secure container and design method thereof
CN104573507A
Method and system for protecting user privacy based on se android
CN109508550A
Software permission control system and method based on Linux operating system
CN114003941A
