IP Library Granted Patent US 12,332,995
Granted Patent B2
US 12,332,995 · App. 17/079,200 · Granted Jun 17, 2025

Containers system auditing through system call emulation

Inventors: Giuseppe Scrivano (Milan, IT); Daniel Walsh (Westford, MA)
Assignee: Red Hat, Inc.
G06F21/53G06F9/45558G06F9/545G06F21/562G06F21/566G06F2009/45587G06F2009/45591G06F2221/034
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,332,995
App. No.
17/079,200
Granted
Jun 17, 2025
Kind
B2
Abstract

Embodiments of the present disclosure provide a substitute audit log for use by applications in the user-space of a host operating system to write audit information. When a container makes a system call attempting to write audit information to an audit log of the kernel, the kernel may utilize a predefined set of instructions indicating how to detect such system calls and how such system calls are to be modified so as to reroute the system call to an unprivileged socket. The kernel write the audit information of the system call to an unprivileged socket that is connected to a substitute audit log. A container management program monitoring the unprivileged socket may write the audit information to the substitute log which is defined in container specific directories of the container.

Claims (52)

1. A method comprising:

detecting a system call attempting to write information to an audit log of a kernel, wherein the system call originates from a container;

creating a socket pair in response to detecting the system call, wherein each socket of the socket pair represents an endpoint of a virtual connection and wherein a second socket of the socket pair is an unprivileged socket and is a different type of socket from a socket initially used by the system call when attempting to write the information to the audit log of a kernel;

connecting a first socket of the socket pair to the container;

modifying, by a processing device, the system call to reroute the system call to the second socket of the socket pair, wherein the second socket is connected to a substitute log that is to receive information intended for the audit log;

writing the information to the second socket of the socket pair; and

in response to detecting that the information has been written to the second socket of the socket pair, writing the information directly from the second socket to the substitute log, wherein the substitute log is defined within one or more directories specific to the container.

2. The method of claim 1 , wherein detecting the system call comprises:

determining that the system call is attempting to create a netfilter socket to communicate with the audit log of the kernel.

3. The method of claim 1 , further comprising:

defining a secure computing mode (seccomp) profile comprising a set of rules for filtering system calls from the container, wherein the set of rules comprises rules instructing the kernel to change arguments of the system call to connect the system call to the second socket of the socket pair; and

providing the seccomp profile to the kernel.

4. The method of claim 3 , wherein modifying the system call comprises:

changing the arguments of the system call to connect the system call to the second socket of the socket pair based on the seccomp profile, wherein the container operates as if it is connected to the audit log of the kernel.

5. The method of claim 4 , further comprising:

monitoring the second socket of the socket pair using a management program, wherein the management program writes the information to the substitute log in response to detecting that the information has been written to the second socket of the socket pair.

6. The method of claim 1 , wherein container tools access the information from the substitute log on an ad-hoc basis.

7. A system comprising:

a memory; and

a processing device operatively coupled to the memory, the processing device to:

detect a system call attempting to write information to an audit log of a kernel, wherein the system call originates from a container;

create a socket pair in response to detecting the system call, wherein each socket of the socket pair represents an endpoint of a virtual connection and wherein a second socket of the socket pair is an unprivileged socket and is a different type of socket from a socket initially used by the system call when attempting to write the information to the audit log of a kernel;

connect a first socket of the socket pair to the container;

modify the system call to reroute the system call to the second socket of the socket pair, wherein the second socket is connected to a substitute log that is to receive information intended for the audit log;

write the information to the second socket of the socket pair; and

in response to detecting that the information has been written to the second socket of the socket pair, write the information directly from the second socket to the substitute log, wherein the substitute log is defined within one or more directories specific to the container.

8. The system of claim 7 , wherein to detect the system call, the processing device is to:

determine that the system call is attempting to create a netfilter socket to communicate with the audit log of the kernel.

9. The system of claim 7 , wherein the processing device is further to:

define a secure computing mode (seccomp) profile comprising a set of rules for filtering system calls from the container, wherein the set of rules comprises rules instructing the kernel to change arguments of the system call to connect the system call to the second socket of the socket pair; and

provide the seccomp profile to the kernel.

10. The system of claim 9 , wherein to modify the system call, the processing device is to:

change, using the kernel, the arguments of the system call to connect the system call to the second socket of the socket pair based on the seccomp profile, wherein the container operates as if it is connected to the audit log of the kernel.

11. The system of claim 10 , wherein the processing device is further to:

monitor the second socket of the socket pair using a management program, wherein the management program writes the information to the substitute log in response to detecting that the information has been written to the second socket of the socket pair.

12. The system of claim 7 , wherein container tools access the information from the substitute log on an ad-hoc basis.

13. A non-transitory computer-readable medium having instructions stored thereon which, when executed by a processing device, cause the processing device to:

detect a system call attempting to write information to an audit log of a kernel, wherein the system call originates from a container;

create a socket pair in response to detecting the system call, wherein each socket of the socket pair represents an endpoint of a virtual connection and wherein a second socket of the socket pair is an unprivileged socket and is a different type of socket from a socket initially used by the system call when attempting to write the information to the audit log of a kernel;

connect a first socket of the socket pair to the container;

modify, by the processing device, the system call to reroute the system call to the second socket of the socket pair, wherein the second socket is connected to a substitute log that is to receive information intended for the audit log;

writing the information to the second socket of the socket pair; and

in response to detecting that the information has been written to the second socket of the socket pair, write the information directly from the second socket to the substitute log, wherein the substitute log is defined within one or more directories specific to the container.

14. The non-transitory computer-readable medium of claim 13 , wherein to detect the system call, the processing device is to:

determine that the system call is attempting to create a netfilter socket to communicate with the audit log of the kernel.

15. The non-transitory computer-readable medium of claim 13 , wherein the processing device is further to:

define a secure computing mode (seccomp) profile comprising a set of rules for filtering system calls from the container, wherein the set of rules comprises rules instructing the kernel to change arguments of the system call to connect the system call to the second socket of the socket pair; and

provide the seccomp profile to the kernel.

16. The non-transitory computer-readable medium of claim 15 , wherein to modify the system call, the processing device is to:

change, using the kernel, the arguments of the system call to connect the system call to the second socket of the socket pair based on the seccomp profile, wherein the container operates as if it is connected to the audit log of the kernel.

17. The system of claim 16 , wherein the processing device is further to:

monitor the second socket of the socket pair using a management program, wherein the management program writes the information to the substitute log in response to detecting that the information has been written to the second socket of the socket pair.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 26, 2020
From: SCRIVANO, GIUSEPPE; WALSH, DANIEL
To: RED HAT, INC.
Reel/Frame 054164/0682 →
Continuity (1)
Related Publication 20220129541A1 · Apr 28, 2022
References Cited (38)
US 5828855A · Walker · 1998 [cited by examiner]
US 8028071B1 · Mahalingam · 2011 [cited by examiner]
US 8169904B1 · Breau · 2012 [cited by examiner]
US 8631464B2 · Belakhdar · 2014 [cited by examiner]
US 10650138B2 · D'Errico et al. · 2020 [cited by applicant]
US 11481487B2 · Halcrow · 2022 [cited by examiner]
US 20030204593A1 · Brown · 2003 [cited by examiner]
US 20060123416A1 · Cibrario Bertolotti · 2006 [cited by examiner]
US 20100027443A1 · LoGalbo · 2010 [cited by examiner]
US 20130024684A1 · Chunduri · 2013 [cited by examiner]
US 20130215213A1 · Power · 2013 [cited by examiner]
US 20150156183A1 · Beyer · 2015 [cited by examiner]
US 20150371053A1 · Welch · 2015 [cited by examiner]
US 20160285753A1 · Guleria · 2016 [cited by examiner]
US 20170048328A1 · Korotaev · 2017 [cited by examiner]
US 20170054770A1 · Wells · 2017 [cited by examiner]
US 20170142144A1 · Weinberger · 2017 [cited by examiner]
US 20170344292A1 · Sterin · 2017 [cited by examiner]
US 20190028490A1 · Chen · 2019 [cited by examiner]
US 20190250835A1 · Piccinini · 2019 [cited by examiner]
US 20190294779A1 · Suneja et al. · 2019 [cited by applicant]
US 20200012511A1 · Ganesh · 2020 [cited by examiner]
US 20210034279A1 · Mishina · 2021 [cited by examiner]
US 20210067553A1 · Ries · 2021 [cited by examiner]
US 20210182078A1 · Rietschin · 2021 [cited by examiner]
US 20220012110A1 · Dhillon · 2022 [cited by examiner]
AU 2005202842A1 · 2006 [cited by examiner]
CN 101551756B · 2012 [cited by examiner]
WO 2019127399 · 2019 [cited by applicant]
Brockmeier, Secure Your Containers with this One Weird Trick, Oct. 17, 2016, Red Hat, pp. 1-8 (Year: 2016). [cited by examiner]
Kerrisk, capabilities(7)—Linux manual page, Oct. 19, 2020, man7.org, pp. 1-23 (Year: 2020). [cited by examiner]
Red Hat Enterprise Linux Atomic Host 7 Container Security Guide, Aug. 6, 2020, Red Hat, pp. 1-19 (Year: 2020). [cited by examiner]
Seccompsandbox—overview.wiki, Sep. 5, 2020, google.com, pp. 1-4 (Year: 2020). [cited by examiner]
Gordon “Fyodor” Lyon, Miscellaneous Options, Oct. 20, 2020, nmap.org (Year: 2020). [cited by examiner]
Grattafiori, “Understanding and Hardening Linux Containers”, Technical Director, NCC Group Whitepaper, Jun. 29, 2016, https://www.nccgroup.com/globalassets/our-research/us/whitepapers/2016/april/ncc_group_understanding_… [cited by applicant]
Jahoda, et al., “Security Guide”, Red Hat Customer Content Services, 2020, https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html-single/security_guide/index. [cited by applicant]
Rothberg, “Improving Linux container security with seccomp”, Red Hat Inc., Jun. 15, 2020, https://www.redhat.com/sysadmin/container-security-seccomp. [cited by applicant]
“Ubunto Core—Security”, Canonical Ubuntu Engineering and Services, Nov. 1, 2018, https://assets.ubuntu.com/v1/66fcd858-canonical-ubuntu-core-security-2018-11-13.pdf. [cited by applicant]