The code for the eBPF kernel module is now public so we can now get a better idea of what it actually does
Most likely the actual interesting stuff is still going to be closed sourced with the eBPF module simply being there to provide kernel level access to EAC linux V2.
https://github.com/EpicGames/eac-ebpf
I asked chatGPT to take a look and got this
1. The overall architecture
The interesting thing is that it isn't really a conventional anti-cheat scanner. It operates at the kernel level and protects processes, executable files and certain kernel objects against interference.
The kernel component is Kernel/ProcessProtection.bpf.c.
It attaches programs to Linux kernel events using two principal mechanisms:
- LSM hooks: These allow the program to approve or reject certain security-sensitive operations.
- Tracepoints: These allow the program to observe events happening in the kernel.
The userspace component is important because it supplies the information about which processes and kernel objects should be protected.
That userspace implementation is not included in this repository.
2. What does it actually protect?
There are five particularly interesting mechanisms.
A. Protection against ptrace
This is implemented through:
- PtraceAccessCheck
- PtraceTraceme
ptrace is a Linux mechanism that allows one process to inspect and control another process.
Debuggers use it, but it can also be used to inspect another process's memory, manipulate execution, set breakpoints and otherwise interfere with it.
EAC uses these hooks to prevent unauthorized processes from using ptrace against protected processes.
The logic is approximately:
There are two slightly different implementations worth understanding.
PtraceAccessCheck checks the process being targeted. It allows the EAC service and the target process itself, but denies other processes.
PtraceTraceme checks the calling process. Protected processes are forbidden from requesting to be traced by their parent, without the service exception.
When something is denied, the program returns -EPERM, which is the standard permission-denied error.
It also emits an event describing the attempted operation.
This is a fairly direct form of anti-tampering protection.
B. Protection of EAC's own BPF maps
This is implemented through BpfMap.
Linux BPF maps are kernel-managed data structures that can be used to exchange information between kernel and userspace programs.
EAC uses several such maps to hold security-related information.
The code maintains a list called:
ProtectedMapIds
It contains the IDs of BPF maps that should be protected.
When another process attempts to obtain a file descriptor for one of those maps, the kernel hook checks its ID.
If the map is protected and the requesting process isn't the EAC service, access is denied.
One important detail: the Linux bpf_map LSM hook runs when the kernel generates and returns a file descriptor for a BPF map. It is not a general interception of every subsequent operation on an already-open map descriptor.
https://linux.googlesource.com/linux/kernel/git/torvalds/linux/+/335c9017e333894c39853f6fc27db9f0ce44f48b/security/security.c?utm_source=chatgpt.com
This is primarily about preventing other processes from accessing or manipulating EAC's own BPF infrastructure.
C. Monitoring executable file mappings
This is one of the more interesting parts.
There are two hooks:
They monitor when files become executable in a process's address space.
For example, consider a game loading a shared library:
- The game opens a shared library.
- It maps that file into its virtual address space.
- The mapping has executable permissions.
- The kernel invokes the relevant LSM hook.
- EAC records information about the mapped file.
The program only records these mappings for processes present in ProtectedTgids.
There are two different scenarios covered:
MmapFile
Detects a file being mapped with executable permissions.
FileMprotect
Detects an existing file-backed mapping being changed to executable.
The second case is important because executable permissions don't necessarily have to be requested at the initial mapping stage. A mapping can become executable later.
Neither hook actually blocks the operation. They both return success after recording the information.
What information gets recorded?
The resulting MappedFileRecord contains:
It also includes the file path itself.
The path is constructed by walking the kernel's directory and mount structures rather than simply copying a userspace-provided filename.
The implementation handles mount points, limits the walk to 64 steps and limits the stored path to 4096 bytes.
When it cannot reconstruct the complete path, it sets the PROTECTION_MAPPED_FILE_FLAG_TRUNCATED flag.
Duplicate suppression
There is another interesting mechanism here.
MappedFileSeen is an LRU hash map with 8192 entries.
Before generating an event, EAC checks whether it has already recorded the same combination of:
- Inode
- Device
- Process ID
- Process cookie
- Mapping flags
If it has, it skips the duplicate event.
This prevents repeated mappings of the same file from generating an excessive number of events.
The LRU design also means old entries can eventually be evicted.
D. Preventing modifications to protected files
This is where the file protection mechanism gets particularly interesting.
The program defines two inode-storage maps:
These are attached to individual filesystem inodes, meaning they associate information with the actual file object rather than merely its pathname.
Here's how the code works.
When a protected process maps a regular file as executable, ClaimMappedFile() calls AddFileTag().
This associates the file with the protected process.
It stores two pieces of information together:
- The process ID (TGID).
- A process cookie.
The cookie is important because process IDs can be reused. It helps distinguish an old process from a new process that happens to receive the same PID.
Later, the FileOpen hook checks whether somebody is trying to open a file for writing or truncation.
It then retrieves both inode tags.
The critical condition is:
The same currently protected process must appear in both FileTags
and DenyTags
.
When that condition is satisfied, the program emits a denial event and returns:
-ETXTBSY
That is the Linux Text file busy error.
In other words, the intention is to prevent modification or truncation of certain files associated with protected processes.
There is an important qualification here, though.
This repository never populates DenyTags
.
It only looks up entries in that map. FileTags, on the other hand, is populated directly by the eBPF program.
Linux does support userspace lookup and updates of inode-storage map entries, so the missing functionality could be implemented by the companion EAC service.
eBPF Docs
But because the userspace implementation isn't included, we cannot establish exactly when or under what conditions EAC adds those deny tags.
There is also a limitation to the enforcement: FileOpen intercepts opening a file, not writes to an already-open file descriptor. This code alone therefore does not prevent subsequent writes through a descriptor that was already opened for writing.
E. Monitoring process execution
This is implemented by:
SchedProcessExec
It attaches to the sched_process_exec kernel tracepoint.
Unlike the previous mechanisms, this one is not restricted to protected processes.
It records information about process executions generally, including:
- Process ID
- User ID
- Process name
- Executable filename
- Timestamp
The events are sent through a ring buffer called ExecEvents.
This gives the userspace EAC service visibility into process execution activity.
Importantly, this hook does not block execution or make any decisions about whether an executable is malicious.
It is a monitoring mechanism.
3. How information is exchanged
The eBPF program and userspace service communicate through BPF maps and ring buffers.
The repository defines the following important maps:
The event structures are defined in ProcessProtectionEvents.h.
An important distinction: losing an event does not necessarily mean losing the protection.
For example, if the denial event ring buffer is full, EmitDenial() simply fails to record the notification. The caller still returns -EPERM or -ETXTBSY.
4. How is it built?
The Makefile is quite straightforward.
The build process is:
- Generate vmlinux.h using the running kernel's BTF information.
- Compile ProcessProtection.bpf.c into a BPF object using Clang.
- Generate a libbpf skeleton using bpftool.
The resulting files are:
- ProcessProtection.bpf.o
- ProcessProtection.lskel.h
The skeleton is intended to make it easier for a userspace program to load and manage the BPF object.
The use of BTF and BPF_CORE_READ is important: it allows the program to access kernel structures such as task_struct, inode and file while accommodating differences in their layouts between kernel versions.
The README specifies that building requires:
- Clang
- bpftool
- libbpf headers
- A kernel built with CONFIG_DEBUG_INFO_BTF
One detail worth noting: the supplied Makefile explicitly targets x86 (-D__TARGET_ARCH_x86).
5. What does this actually mean for anti-cheat?
There are some important distinctions between what this code does and what people might assume an anti-cheat system does.
The absence of something here doesn't prove the entire EAC client lacks that functionality. It simply isn't implemented in this repository.
6. My overall assessment
I think the most important thing to understand about this project is that it provides
kernel-level protection and telemetry, rather than a complete cheat-detection engine.
There are three main goals:
- Make protected processes harder to interfere with. The ptrace restrictions are probably the clearest example.
- Protect EAC's own infrastructure. The BPF map restrictions prevent unauthorized processes from obtaining access to selected internal maps.
- Observe activity surrounding protected processes. Executable file mappings and process executions provide information that the userspace service can potentially use for further analysis.
There are also some unanswered questions that I would particularly like to investigate:
- What exactly populates DenyTags, and when?
- How does the userspace client decide which processes enter ProtectedTgids?
- What does it do with the executable mapping and execution events?
- How does it respond to detected interference?
The repository README explicitly describes this as the eBPF component of the Linux client, published to satisfy the GPL source-distribution requirements. It is not the complete client.
My conclusion: The interesting part isn't so much the individual hooks as the combination of kernel enforcement and userspace-managed protection state. The kernel component establishes boundaries that ordinary userspace processes cannot simply bypass through normal process operations, while supplying information to the EAC service.
Understanding the missing userspace component would be the next major step toward understanding how EAC on Linux actually works as a complete system.
I asked about security implications and didn't get a good answer